gfx/skia/trunk/src/animator/SkDrawGradient.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 SkDrawGradient_DEFINED
michael@0 11 #define SkDrawGradient_DEFINED
michael@0 12
michael@0 13 #include "SkDrawColor.h"
michael@0 14 #include "SkDrawShader.h"
michael@0 15 #include "SkIntArray.h"
michael@0 16
michael@0 17 class SkUnitMapper;
michael@0 18
michael@0 19 class SkDrawGradient : public SkDrawShader {
michael@0 20 DECLARE_PRIVATE_MEMBER_INFO(DrawGradient);
michael@0 21 SkDrawGradient();
michael@0 22 virtual ~SkDrawGradient();
michael@0 23 virtual bool addChild(SkAnimateMaker& , SkDisplayable* child) SK_OVERRIDE;
michael@0 24 #ifdef SK_DUMP_ENABLED
michael@0 25 virtual void dumpRest(SkAnimateMaker*);
michael@0 26 #endif
michael@0 27 virtual void onEndElement(SkAnimateMaker& );
michael@0 28 protected:
michael@0 29 SkTDScalarArray offsets;
michael@0 30 SkString unitMapper;
michael@0 31 SkTDColorArray fColors;
michael@0 32 SkTDDrawColorArray fDrawColors;
michael@0 33 SkUnitMapper* fUnitMapper;
michael@0 34 int addPrelude();
michael@0 35 private:
michael@0 36 typedef SkDrawShader INHERITED;
michael@0 37 };
michael@0 38
michael@0 39 class SkDrawLinearGradient : public SkDrawGradient {
michael@0 40 DECLARE_MEMBER_INFO(DrawLinearGradient);
michael@0 41 SkDrawLinearGradient();
michael@0 42 virtual void onEndElement(SkAnimateMaker& );
michael@0 43 #ifdef SK_DUMP_ENABLED
michael@0 44 virtual void dump(SkAnimateMaker*);
michael@0 45 #endif
michael@0 46 virtual SkShader* getShader();
michael@0 47 protected:
michael@0 48 SkTDScalarArray points;
michael@0 49 private:
michael@0 50 typedef SkDrawGradient INHERITED;
michael@0 51 };
michael@0 52
michael@0 53 class SkDrawRadialGradient : public SkDrawGradient {
michael@0 54 DECLARE_MEMBER_INFO(DrawRadialGradient);
michael@0 55 SkDrawRadialGradient();
michael@0 56 #ifdef SK_DUMP_ENABLED
michael@0 57 virtual void dump(SkAnimateMaker*);
michael@0 58 #endif
michael@0 59 virtual SkShader* getShader();
michael@0 60 protected:
michael@0 61 SkPoint center;
michael@0 62 SkScalar radius;
michael@0 63 private:
michael@0 64 typedef SkDrawGradient INHERITED;
michael@0 65 };
michael@0 66
michael@0 67 #endif // SkDrawGradient_DEFINED

mercurial