| 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 SkPictureRecord_DEFINED | 8 #ifndef SkPictureRecord_DEFINED |
| 9 #define SkPictureRecord_DEFINED | 9 #define SkPictureRecord_DEFINED |
| 10 | 10 |
| 11 #include "SkCanvas.h" | 11 #include "SkCanvas.h" |
| 12 #include "SkFlattenable.h" | 12 #include "SkFlattenable.h" |
| 13 #include "SkPathHeap.h" | 13 #include "SkPathHeap.h" |
| 14 #include "SkPicture.h" | 14 #include "SkPicture.h" |
| 15 #include "SkPictureData.h" | 15 #include "SkPictureData.h" |
| 16 #include "SkPictureFlat.h" | |
| 17 #include "SkTemplates.h" | 16 #include "SkTemplates.h" |
| 18 #include "SkWriter32.h" | 17 #include "SkWriter32.h" |
| 19 | 18 |
| 20 // These macros help with packing and unpacking a single byte value and | 19 // These macros help with packing and unpacking a single byte value and |
| 21 // a 3 byte value into/out of a uint32_t | 20 // a 3 byte value into/out of a uint32_t |
| 22 #define MASK_24 0x00FFFFFF | 21 #define MASK_24 0x00FFFFFF |
| 23 #define UNPACK_8_24(combined, small, large) \ | 22 #define UNPACK_8_24(combined, small, large) \ |
| 24 small = (combined >> 24) & 0xFF; \ | 23 small = (combined >> 24) & 0xFF; \ |
| 25 large = combined & MASK_24; | 24 large = combined & MASK_24; |
| 26 #define PACK_8_24(small, large) ((small << 24) | large) | 25 #define PACK_8_24(small, large) ((small << 24) | large) |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 void recordSaveLayer(const SkRect* bounds, const SkPaint* paint, SaveFlags f
lags); | 236 void recordSaveLayer(const SkRect* bounds, const SkPaint* paint, SaveFlags f
lags); |
| 238 void recordRestore(bool fillInSkips = true); | 237 void recordRestore(bool fillInSkips = true); |
| 239 | 238 |
| 240 // Allocated in the constructor and managed by this class. | 239 // Allocated in the constructor and managed by this class. |
| 241 SkBitmapHeap* fBitmapHeap; | 240 SkBitmapHeap* fBitmapHeap; |
| 242 | 241 |
| 243 private: | 242 private: |
| 244 SkPictureContentInfo fContentInfo; | 243 SkPictureContentInfo fContentInfo; |
| 245 SkAutoTUnref<SkPathHeap> fPathHeap; | 244 SkAutoTUnref<SkPathHeap> fPathHeap; |
| 246 | 245 |
| 247 SkChunkFlatController fFlattenableHeap; | 246 SkTArray<SkPaint> fPaints; |
| 248 | |
| 249 SkPaintDictionary fPaints; | |
| 250 | 247 |
| 251 SkWriter32 fWriter; | 248 SkWriter32 fWriter; |
| 252 | 249 |
| 253 // we ref each item in these arrays | 250 // we ref each item in these arrays |
| 254 SkTDArray<const SkPicture*> fPictureRefs; | 251 SkTDArray<const SkPicture*> fPictureRefs; |
| 255 SkTDArray<const SkTextBlob*> fTextBlobRefs; | 252 SkTDArray<const SkTextBlob*> fTextBlobRefs; |
| 256 | 253 |
| 257 uint32_t fRecordFlags; | 254 uint32_t fRecordFlags; |
| 258 int fInitialSaveCount; | 255 int fInitialSaveCount; |
| 259 | 256 |
| 260 friend class SkPictureData; // for SkPictureData's SkPictureRecord-based c
onstructor | 257 friend class SkPictureData; // for SkPictureData's SkPictureRecord-based c
onstructor |
| 261 | 258 |
| 262 typedef SkCanvas INHERITED; | 259 typedef SkCanvas INHERITED; |
| 263 }; | 260 }; |
| 264 | 261 |
| 265 #endif | 262 #endif |
| OLD | NEW |