gfx/skia/trunk/src/animator/SkDrawPath.h

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

michael@0 1
michael@0 2 /*
michael@0 3 * Copyright 2006 The Android Open Source Project
michael@0 4 *
michael@0 5 * Use of this source code is governed by a BSD-style license that can be
michael@0 6 * found in the LICENSE file.
michael@0 7 */
michael@0 8
michael@0 9
michael@0 10 #ifndef SkDrawPath_DEFINED
michael@0 11 #define SkDrawPath_DEFINED
michael@0 12
michael@0 13 #include "SkBoundable.h"
michael@0 14 #include "SkIntArray.h"
michael@0 15 #include "SkMemberInfo.h"
michael@0 16 #include "SkPath.h"
michael@0 17
michael@0 18 class SkDrawPath : public SkBoundable {
michael@0 19 DECLARE_DRAW_MEMBER_INFO(Path);
michael@0 20 SkDrawPath();
michael@0 21 virtual ~SkDrawPath();
michael@0 22 virtual bool addChild(SkAnimateMaker& , SkDisplayable* child) SK_OVERRIDE;
michael@0 23 bool childHasID() { return SkToBool(fChildHasID); }
michael@0 24 virtual bool childrenNeedDisposing() const;
michael@0 25 virtual void dirty();
michael@0 26 virtual bool draw(SkAnimateMaker& );
michael@0 27 virtual SkDisplayable* getParent() const;
michael@0 28 #ifdef SK_DUMP_ENABLED
michael@0 29 virtual void dump(SkAnimateMaker* );
michael@0 30 #endif
michael@0 31 SkPath& getPath();
michael@0 32 virtual bool getProperty(int index, SkScriptValue* value) const;
michael@0 33 virtual bool setProperty(int index, SkScriptValue& value);
michael@0 34 virtual void onEndElement(SkAnimateMaker& );
michael@0 35 virtual void setChildHasID();
michael@0 36 virtual bool setParent(SkDisplayable* parent);
michael@0 37 virtual bool isPath() const { return true; }
michael@0 38 public:
michael@0 39 SkPath fPath;
michael@0 40 protected:
michael@0 41 void parseSVG();
michael@0 42 SkString d;
michael@0 43 SkTDPathPartArray fParts;
michael@0 44 mutable SkScalar fLength;
michael@0 45 SkDisplayable* fParent; // SkPolyToPoly or SkFromPath, for instance
michael@0 46 SkBool8 fChildHasID;
michael@0 47 SkBool8 fDirty;
michael@0 48 private:
michael@0 49 typedef SkBoundable INHERITED;
michael@0 50 };
michael@0 51
michael@0 52 class SkPolyline : public SkDrawPath {
michael@0 53 DECLARE_MEMBER_INFO(Polyline);
michael@0 54 virtual bool addChild(SkAnimateMaker& , SkDisplayable*) SK_OVERRIDE;
michael@0 55 virtual void onEndElement(SkAnimateMaker& );
michael@0 56 protected:
michael@0 57 SkTDScalarArray points;
michael@0 58 private:
michael@0 59 typedef SkDrawPath INHERITED;
michael@0 60 };
michael@0 61
michael@0 62 class SkPolygon : public SkPolyline {
michael@0 63 DECLARE_MEMBER_INFO(Polygon);
michael@0 64 virtual void onEndElement(SkAnimateMaker& );
michael@0 65 private:
michael@0 66 typedef SkPolyline INHERITED;
michael@0 67 };
michael@0 68
michael@0 69 #endif // SkDrawPath_DEFINED

mercurial