gfx/skia/trunk/src/animator/SkDisplayAdd.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 SkDisplayAdd_DEFINED
    11 #define SkDisplayAdd_DEFINED
    13 #include "SkDrawable.h"
    14 #include "SkMemberInfo.h"
    16 class SkAdd : public SkDrawable {
    17     DECLARE_MEMBER_INFO(Add);
    18     SkAdd();
    20     enum Mode {
    21         kMode_indirect,
    22         kMode_immediate
    23     };
    25     virtual SkDisplayable* deepCopy(SkAnimateMaker* );
    26     virtual bool draw(SkAnimateMaker& );
    27 #ifdef SK_DUMP_ENABLED
    28     virtual void dump(SkAnimateMaker* );
    29 #endif
    30     virtual bool enable(SkAnimateMaker& );
    31     virtual bool hasEnable() const;
    32     virtual void initialize();
    33     virtual bool isDrawable() const;
    34 protected:
    35 //  struct _A {
    36         Mode mode;
    37         int32_t offset;
    38         SkDrawable* use;
    39         SkDrawable* where;  // if NULL, offset becomes index
    40 //  } A;
    41 private:
    42     typedef SkDrawable INHERITED;
    43 };
    45 class SkClear : public SkDisplayable {
    46     virtual bool enable(SkAnimateMaker& );
    47 };
    49 class SkMove : public SkAdd {
    50     DECLARE_MEMBER_INFO(Move);
    51 private:
    52     typedef SkAdd INHERITED;
    53 };
    55 class SkRemove : public SkAdd {
    56     DECLARE_MEMBER_INFO(Remove);
    57     SkRemove();
    58 protected:
    59     SkBool fDelete;
    60 private:
    61     friend class SkAdd;
    62     typedef SkAdd INHERITED;
    63 };
    65 class SkReplace : public SkAdd {
    66     DECLARE_MEMBER_INFO(Replace);
    67 private:
    68     typedef SkAdd INHERITED;
    69 };
    71 #endif // SkDisplayAdd_DEFINED

mercurial