gfx/skia/trunk/src/animator/SkDrawBitmap.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 SkDrawBitmap_DEFINED
michael@0 11 #define SkDrawBitmap_DEFINED
michael@0 12
michael@0 13 #include "SkBoundable.h"
michael@0 14 #include "SkBase64.h"
michael@0 15 #include "SkBitmap.h"
michael@0 16 // #include "SkImageDecoder.h"
michael@0 17 #include "SkMemberInfo.h"
michael@0 18
michael@0 19 class SkBaseBitmap : public SkBoundable {
michael@0 20 DECLARE_MEMBER_INFO(BaseBitmap);
michael@0 21 SkBaseBitmap();
michael@0 22 virtual ~SkBaseBitmap();
michael@0 23 virtual bool draw(SkAnimateMaker& );
michael@0 24 protected:
michael@0 25 SkBitmap fBitmap;
michael@0 26 SkScalar x;
michael@0 27 SkScalar y;
michael@0 28 private:
michael@0 29 friend class SkDrawTo;
michael@0 30 friend class SkDrawBitmapShader;
michael@0 31 typedef SkBoundable INHERITED;
michael@0 32 };
michael@0 33
michael@0 34 class SkDrawBitmap : public SkBaseBitmap {
michael@0 35 DECLARE_DRAW_MEMBER_INFO(Bitmap);
michael@0 36 SkDrawBitmap();
michael@0 37 virtual ~SkDrawBitmap();
michael@0 38 #ifdef SK_DUMP_ENABLED
michael@0 39 virtual void dump(SkAnimateMaker* );
michael@0 40 #endif
michael@0 41 virtual void onEndElement(SkAnimateMaker& );
michael@0 42 virtual bool setProperty(int index, SkScriptValue& value);
michael@0 43 protected:
michael@0 44 int /*SkBitmap::Config*/ format;
michael@0 45 int32_t height;
michael@0 46 int32_t rowBytes;
michael@0 47 int32_t width;
michael@0 48 SkColor fColor;
michael@0 49 SkBool fColorSet;
michael@0 50 typedef SkBaseBitmap INHERITED;
michael@0 51 };
michael@0 52
michael@0 53 class SkImageBaseBitmap : public SkBaseBitmap {
michael@0 54 DECLARE_MEMBER_INFO(ImageBaseBitmap);
michael@0 55 SkImageBaseBitmap();
michael@0 56 virtual ~SkImageBaseBitmap();
michael@0 57 virtual SkDisplayable* deepCopy(SkAnimateMaker* );
michael@0 58 virtual void dirty();
michael@0 59 virtual bool draw(SkAnimateMaker& );
michael@0 60 virtual bool getProperty(int index, SkScriptValue* value) const;
michael@0 61 virtual void onEndElement(SkAnimateMaker& maker);
michael@0 62 private:
michael@0 63 void resolve() const { (const_cast<SkImageBaseBitmap*>(this))->resolve(); }
michael@0 64 void resolve();
michael@0 65 protected:
michael@0 66 SkBase64 base64;
michael@0 67 SkString src;
michael@0 68 SkString fLast; // cache of src so that stream isn't unnecessarily decoded
michael@0 69 SkBool fDirty;
michael@0 70 const char* fUriBase;
michael@0 71 typedef SkBaseBitmap INHERITED;
michael@0 72 };
michael@0 73
michael@0 74 #endif // SkDrawBitmap_DEFINED

mercurial