| 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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 | 239 |
| 240 /** | 240 /** |
| 241 * Calls getRecommendedSampleCount with GrPixelConfig and dpi to calculate s
ampleCount | 241 * Calls getRecommendedSampleCount with GrPixelConfig and dpi to calculate s
ampleCount |
| 242 * and then calls the above version of suitableForGpuRasterization | 242 * and then calls the above version of suitableForGpuRasterization |
| 243 */ | 243 */ |
| 244 bool suitableForGpuRasterization(GrContext* context, const char **reason, | 244 bool suitableForGpuRasterization(GrContext* context, const char **reason, |
| 245 GrPixelConfig config, SkScalar dpi) const; | 245 GrPixelConfig config, SkScalar dpi) const; |
| 246 #endif | 246 #endif |
| 247 | 247 |
| 248 private: | 248 private: |
| 249 friend class SkPicture; // needed in SkPicture::clone (rm when it is removed
) |
| 250 |
| 249 void init(); | 251 void init(); |
| 250 | 252 |
| 251 // these help us with reading/writing | 253 // these help us with reading/writing |
| 252 bool parseStreamTag(SkStream*, uint32_t tag, uint32_t size, SkPicture::Insta
llPixelRefProc); | 254 bool parseStreamTag(SkStream*, uint32_t tag, uint32_t size, SkPicture::Insta
llPixelRefProc); |
| 253 bool parseBufferTag(SkReadBuffer&, uint32_t tag, uint32_t size); | 255 bool parseBufferTag(SkReadBuffer&, uint32_t tag, uint32_t size); |
| 254 void flattenToBuffer(SkWriteBuffer&) const; | 256 void flattenToBuffer(SkWriteBuffer&) const; |
| 255 | 257 |
| 256 // Only used by getBitmap() if the passed in index is SkBitmapHeap::INVALID_
SLOT. This empty | 258 // Only used by getBitmap() if the passed in index is SkBitmapHeap::INVALID_
SLOT. This empty |
| 257 // bitmap allows playback to draw nothing and move on. | 259 // bitmap allows playback to draw nothing and move on. |
| 258 SkBitmap fBadBitmap; | 260 SkBitmap fBadBitmap; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 279 | 281 |
| 280 const SkPictInfo fInfo; | 282 const SkPictInfo fInfo; |
| 281 | 283 |
| 282 static void WriteFactories(SkWStream* stream, const SkFactorySet& rec); | 284 static void WriteFactories(SkWStream* stream, const SkFactorySet& rec); |
| 283 static void WriteTypefaces(SkWStream* stream, const SkRefCntSet& rec); | 285 static void WriteTypefaces(SkWStream* stream, const SkRefCntSet& rec); |
| 284 | 286 |
| 285 void initForPlayback() const; | 287 void initForPlayback() const; |
| 286 }; | 288 }; |
| 287 | 289 |
| 288 #endif | 290 #endif |
| OLD | NEW |