gfx/skia/trunk/src/animator/SkMatrixParts.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.

     2 /*
     3  * Copyright 2006 The Android Open Source Project
     4  *
     5  * Use of this source code is governed by a BSD-style license that can be
     6  * found in the LICENSE file.
     7  */
    10 #ifndef SkMatrixParts_DEFINED
    11 #define SkMatrixParts_DEFINED
    13 #include "SkDisplayable.h"
    14 #include "SkMemberInfo.h"
    15 #include "SkPathMeasure.h"
    17 class SkDrawPath;
    18 class SkDrawRect;
    19 class SkPolygon;
    21 class SkDrawMatrix;
    22 // class SkMatrix;
    24 class SkMatrixPart : public SkDisplayable {
    25 public:
    26     SkMatrixPart();
    27     virtual bool add() = 0;
    28     virtual void dirty();
    29     virtual SkDisplayable* getParent() const;
    30     virtual bool setParent(SkDisplayable* parent);
    31 #ifdef SK_DEBUG
    32     virtual bool isMatrixPart() const { return true; }
    33 #endif
    34 protected:
    35     SkDrawMatrix* fMatrix;
    36 };
    38 class SkRotate : public SkMatrixPart {
    39     DECLARE_MEMBER_INFO(Rotate);
    40     SkRotate();
    41 protected:
    42     virtual bool add();
    43     SkScalar degrees;
    44     SkPoint center;
    45 };
    47 class SkScale : public SkMatrixPart {
    48     DECLARE_MEMBER_INFO(Scale);
    49     SkScale();
    50 protected:
    51     virtual bool add();
    52     SkScalar x;
    53     SkScalar y;
    54     SkPoint center;
    55 };
    57 class SkSkew : public SkMatrixPart {
    58     DECLARE_MEMBER_INFO(Skew);
    59     SkSkew();
    60 protected:
    61     virtual bool add();
    62     SkScalar x;
    63     SkScalar y;
    64     SkPoint center;
    65 };
    67 class SkTranslate : public SkMatrixPart {
    68     DECLARE_MEMBER_INFO(Translate);
    69     SkTranslate();
    70 protected:
    71     virtual bool add();
    72     SkScalar x;
    73     SkScalar y;
    74 };
    76 class SkFromPath : public SkMatrixPart {
    77     DECLARE_MEMBER_INFO(FromPath);
    78     SkFromPath();
    79     virtual ~SkFromPath();
    80 protected:
    81     virtual bool add();
    82     int32_t mode;
    83     SkScalar offset;
    84     SkDrawPath* path;
    85     SkPathMeasure fPathMeasure;
    86 };
    88 class SkRectToRect : public SkMatrixPart {
    89     DECLARE_MEMBER_INFO(RectToRect);
    90     SkRectToRect();
    91     virtual ~SkRectToRect();
    92 #ifdef SK_DUMP_ENABLED
    93     virtual void dump(SkAnimateMaker* );
    94 #endif
    95     virtual const SkMemberInfo* preferredChild(SkDisplayTypes type);
    96 protected:
    97     virtual bool add();
    98     SkDrawRect* source;
    99     SkDrawRect* destination;
   100 };
   102 class SkPolyToPoly : public SkMatrixPart {
   103     DECLARE_MEMBER_INFO(PolyToPoly);
   104     SkPolyToPoly();
   105     virtual ~SkPolyToPoly();
   106 #ifdef SK_DUMP_ENABLED
   107     virtual void dump(SkAnimateMaker* );
   108 #endif
   109     virtual void onEndElement(SkAnimateMaker& );
   110     virtual const SkMemberInfo* preferredChild(SkDisplayTypes type);
   111 protected:
   112     virtual bool add();
   113     SkPolygon* source;
   114     SkPolygon* destination;
   115 };
   117 // !!! add concat matrix ?
   119 #endif // SkMatrixParts_DEFINED

mercurial