OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
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 SkPictureData_DEFINED | 8 #ifndef SkPictureData_DEFINED |
9 #define SkPictureData_DEFINED | 9 #define SkPictureData_DEFINED |
10 | 10 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 #define SK_PICT_PAINT_BUFFER_TAG SkSetFourByteTag('p', 'n', 't', ' ') | 53 #define SK_PICT_PAINT_BUFFER_TAG SkSetFourByteTag('p', 'n', 't', ' ') |
54 #define SK_PICT_PATH_BUFFER_TAG SkSetFourByteTag('p', 't', 'h', ' ') | 54 #define SK_PICT_PATH_BUFFER_TAG SkSetFourByteTag('p', 't', 'h', ' ') |
55 #define SK_PICT_TEXTBLOB_BUFFER_TAG SkSetFourByteTag('b', 'l', 'o', 'b') | 55 #define SK_PICT_TEXTBLOB_BUFFER_TAG SkSetFourByteTag('b', 'l', 'o', 'b') |
56 #define SK_PICT_IMAGE_BUFFER_TAG SkSetFourByteTag('i', 'm', 'a', 'g') | 56 #define SK_PICT_IMAGE_BUFFER_TAG SkSetFourByteTag('i', 'm', 'a', 'g') |
57 | 57 |
58 // Always write this guy last (with no length field afterwards) | 58 // Always write this guy last (with no length field afterwards) |
59 #define SK_PICT_EOF_TAG SkSetFourByteTag('e', 'o', 'f', ' ') | 59 #define SK_PICT_EOF_TAG SkSetFourByteTag('e', 'o', 'f', ' ') |
60 | 60 |
61 class SkPictureData { | 61 class SkPictureData { |
62 public: | 62 public: |
63 SkPictureData(const SkPictureRecord& record, const SkPictInfo&, bool deepCop
yOps); | 63 SkPictureData(const SkPictureRecord& record, const SkPictInfo&); |
64 // Does not affect ownership of SkStream. | 64 // Does not affect ownership of SkStream. |
65 static SkPictureData* CreateFromStream(SkStream*, | 65 static SkPictureData* CreateFromStream(SkStream*, |
66 const SkPictInfo&, | 66 const SkPictInfo&, |
67 SkPicture::InstallPixelRefProc, | 67 SkPicture::InstallPixelRefProc, |
68 SkTypefacePlayback*); | 68 SkTypefacePlayback*); |
69 static SkPictureData* CreateFromBuffer(SkReadBuffer&, const SkPictInfo&); | 69 static SkPictureData* CreateFromBuffer(SkReadBuffer&, const SkPictInfo&); |
70 | 70 |
71 virtual ~SkPictureData(); | 71 virtual ~SkPictureData(); |
72 | 72 |
73 void serialize(SkWStream*, SkPixelSerializer*, SkRefCntSet*) const; | 73 void serialize(SkWStream*, SkPixelSerializer*, SkRefCntSet*) const; |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 | 182 |
183 const SkPictInfo fInfo; | 183 const SkPictInfo fInfo; |
184 | 184 |
185 static void WriteFactories(SkWStream* stream, const SkFactorySet& rec); | 185 static void WriteFactories(SkWStream* stream, const SkFactorySet& rec); |
186 static void WriteTypefaces(SkWStream* stream, const SkRefCntSet& rec); | 186 static void WriteTypefaces(SkWStream* stream, const SkRefCntSet& rec); |
187 | 187 |
188 void initForPlayback() const; | 188 void initForPlayback() const; |
189 }; | 189 }; |
190 | 190 |
191 #endif | 191 #endif |
OLD | NEW |