| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2007 The Android Open Source Project | 2 * Copyright 2007 The Android Open Source Project |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef SkPicture_DEFINED | 8 #ifndef SkPicture_DEFINED |
| 9 #define SkPicture_DEFINED | 9 #define SkPicture_DEFINED |
| 10 | 10 |
| 11 #include "SkImageDecoder.h" | 11 #include "SkImageDecoder.h" |
| 12 #include "SkRefCnt.h" | 12 #include "SkRefCnt.h" |
| 13 #include "SkTypes.h" | 13 #include "SkTypes.h" |
| 14 | 14 |
| 15 class GrContext; | 15 class GrContext; |
| 16 class SkBigPicture; | 16 class SkBigPicture; |
| 17 class SkBitmap; | 17 class SkBitmap; |
| 18 class SkCanvas; | 18 class SkCanvas; |
| 19 class SkPictureData; | 19 class SkPictureData; |
| 20 class SkPixelSerializer; | 20 class SkPixelSerializer; |
| 21 class SkRefCntSet; |
| 21 class SkStream; | 22 class SkStream; |
| 23 class SkTypefacePlayback; |
| 22 class SkWStream; | 24 class SkWStream; |
| 23 struct SkPictInfo; | 25 struct SkPictInfo; |
| 24 | 26 |
| 25 /** \class SkPicture | 27 /** \class SkPicture |
| 26 | 28 |
| 27 An SkPicture records drawing commands made to a canvas to be played back at
a later time. | 29 An SkPicture records drawing commands made to a canvas to be played back at
a later time. |
| 28 This base class handles serialization and a few other miscellany. | 30 This base class handles serialization and a few other miscellany. |
| 29 */ | 31 */ |
| 30 class SK_API SkPicture : public SkRefCnt { | 32 class SK_API SkPicture : public SkRefCnt { |
| 31 public: | 33 public: |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 static void SetPictureIOSecurityPrecautionsEnabled_Dangerous(bool set); | 158 static void SetPictureIOSecurityPrecautionsEnabled_Dangerous(bool set); |
| 157 static bool PictureIOSecurityPrecautionsEnabled(); | 159 static bool PictureIOSecurityPrecautionsEnabled(); |
| 158 | 160 |
| 159 private: | 161 private: |
| 160 // Subclass whitelist. | 162 // Subclass whitelist. |
| 161 SkPicture(); | 163 SkPicture(); |
| 162 friend class SkBigPicture; | 164 friend class SkBigPicture; |
| 163 friend class SkEmptyPicture; | 165 friend class SkEmptyPicture; |
| 164 template <typename> friend class SkMiniPicture; | 166 template <typename> friend class SkMiniPicture; |
| 165 | 167 |
| 168 void serialize(SkWStream*, SkPixelSerializer*, SkRefCntSet* typefaces) const
; |
| 169 static SkPicture* CreateFromStream(SkStream*, |
| 170 InstallPixelRefProc proc, |
| 171 SkTypefacePlayback*); |
| 172 friend class SkPictureData; |
| 173 |
| 166 virtual int numSlowPaths() const = 0; | 174 virtual int numSlowPaths() const = 0; |
| 167 friend struct SkPathCounter; | 175 friend struct SkPathCounter; |
| 168 | 176 |
| 169 // V35: Store SkRect (rather then width & height) in header | 177 // V35: Store SkRect (rather then width & height) in header |
| 170 // V36: Remove (obsolete) alphatype from SkColorTable | 178 // V36: Remove (obsolete) alphatype from SkColorTable |
| 171 // V37: Added shadow only option to SkDropShadowImageFilter (last version to
record CLEAR) | 179 // V37: Added shadow only option to SkDropShadowImageFilter (last version to
record CLEAR) |
| 172 // V38: Added PictureResolution option to SkPictureImageFilter | 180 // V38: Added PictureResolution option to SkPictureImageFilter |
| 173 // V39: Added FilterLevel option to SkPictureImageFilter | 181 // V39: Added FilterLevel option to SkPictureImageFilter |
| 174 // V40: Remove UniqueID serialization from SkImageFilter. | 182 // V40: Remove UniqueID serialization from SkImageFilter. |
| 175 // V41: Added serialization of SkBitmapSource's filterQuality parameter | 183 // V41: Added serialization of SkBitmapSource's filterQuality parameter |
| (...skipping 13 matching lines...) Expand all Loading... |
| 189 static bool IsValidPictInfo(const SkPictInfo& info); | 197 static bool IsValidPictInfo(const SkPictInfo& info); |
| 190 static SkPicture* Forwardport(const SkPictInfo&, const SkPictureData*); | 198 static SkPicture* Forwardport(const SkPictInfo&, const SkPictureData*); |
| 191 | 199 |
| 192 SkPictInfo createHeader() const; | 200 SkPictInfo createHeader() const; |
| 193 SkPictureData* backport() const; | 201 SkPictureData* backport() const; |
| 194 | 202 |
| 195 mutable uint32_t fUniqueID; | 203 mutable uint32_t fUniqueID; |
| 196 }; | 204 }; |
| 197 | 205 |
| 198 #endif | 206 #endif |
| OLD | NEW |