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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 private: | 146 private: |
147 void init(); | 147 void init(); |
148 | 148 |
149 // these help us with reading/writing | 149 // these help us with reading/writing |
150 // Does not affect ownership of SkStream. | 150 // Does not affect ownership of SkStream. |
151 bool parseStreamTag(SkStream*, uint32_t tag, uint32_t size, | 151 bool parseStreamTag(SkStream*, uint32_t tag, uint32_t size, |
152 SkPicture::InstallPixelRefProc, SkTypefacePlayback*); | 152 SkPicture::InstallPixelRefProc, SkTypefacePlayback*); |
153 bool parseBufferTag(SkReadBuffer&, uint32_t tag, uint32_t size); | 153 bool parseBufferTag(SkReadBuffer&, uint32_t tag, uint32_t size); |
154 void flattenToBuffer(SkWriteBuffer&) const; | 154 void flattenToBuffer(SkWriteBuffer&) const; |
155 | 155 |
156 // Only used by getBitmap() if the passed in index is SkBitmapHeap::INVALID_
SLOT. This empty | |
157 // bitmap allows playback to draw nothing and move on. | |
158 SkBitmap fBadBitmap; | |
159 | |
160 SkTArray<SkBitmap> fBitmaps; | 156 SkTArray<SkBitmap> fBitmaps; |
161 SkTArray<SkPaint> fPaints; | 157 SkTArray<SkPaint> fPaints; |
162 SkTArray<SkPath> fPaths; | 158 SkTArray<SkPath> fPaths; |
163 | 159 |
164 sk_sp<SkData> fOpData; // opcodes and parameters | 160 sk_sp<SkData> fOpData; // opcodes and parameters |
165 | 161 |
166 const SkPath fEmptyPath; | 162 const SkPath fEmptyPath; |
167 const SkBitmap fEmptyBitmap; | 163 const SkBitmap fEmptyBitmap; |
168 | 164 |
169 const SkPicture** fPictureRefs; | 165 const SkPicture** fPictureRefs; |
(...skipping 12 matching lines...) Expand all Loading... |
182 | 178 |
183 const SkPictInfo fInfo; | 179 const SkPictInfo fInfo; |
184 | 180 |
185 static void WriteFactories(SkWStream* stream, const SkFactorySet& rec); | 181 static void WriteFactories(SkWStream* stream, const SkFactorySet& rec); |
186 static void WriteTypefaces(SkWStream* stream, const SkRefCntSet& rec); | 182 static void WriteTypefaces(SkWStream* stream, const SkRefCntSet& rec); |
187 | 183 |
188 void initForPlayback() const; | 184 void initForPlayback() const; |
189 }; | 185 }; |
190 | 186 |
191 #endif | 187 #endif |
OLD | NEW |