OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #ifndef SkWriteBuffer_DEFINED | 9 #ifndef SkWriteBuffer_DEFINED |
10 #define SkWriteBuffer_DEFINED | 10 #define SkWriteBuffer_DEFINED |
11 | 11 |
12 #include "SkData.h" | 12 #include "SkData.h" |
13 #include "SkImage.h" | 13 #include "SkImage.h" |
14 #include "SkPath.h" | 14 #include "SkPath.h" |
15 #include "SkPicture.h" | 15 #include "SkPicture.h" |
16 #include "SkPixelSerializer.h" | 16 #include "SkPixelSerializer.h" |
17 #include "SkRefCnt.h" | 17 #include "SkRefCnt.h" |
18 #include "SkWriter32.h" | 18 #include "SkWriter32.h" |
| 19 #include "../private/SkTHash.h" |
19 | 20 |
20 class SkBitmap; | 21 class SkBitmap; |
21 class SkBitmapHeap; | 22 class SkBitmapHeap; |
22 class SkFactorySet; | 23 class SkFactorySet; |
23 class SkFlattenable; | 24 class SkFlattenable; |
24 class SkRefCntSet; | 25 class SkRefCntSet; |
25 | 26 |
26 class SkWriteBuffer { | 27 class SkWriteBuffer { |
27 public: | 28 public: |
28 enum Flags { | 29 enum Flags { |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 bool isValidating() const { return SkToBool(fFlags & kValidation_Flag); } | 112 bool isValidating() const { return SkToBool(fFlags & kValidation_Flag); } |
112 | 113 |
113 const uint32_t fFlags; | 114 const uint32_t fFlags; |
114 SkFactorySet* fFactorySet; | 115 SkFactorySet* fFactorySet; |
115 SkWriter32 fWriter; | 116 SkWriter32 fWriter; |
116 | 117 |
117 SkBitmapHeap* fBitmapHeap; | 118 SkBitmapHeap* fBitmapHeap; |
118 SkRefCntSet* fTFSet; | 119 SkRefCntSet* fTFSet; |
119 | 120 |
120 SkAutoTUnref<SkPixelSerializer> fPixelSerializer; | 121 SkAutoTUnref<SkPixelSerializer> fPixelSerializer; |
| 122 |
| 123 // Only used if we do not have an fFactorySet |
| 124 SkTHashMap<SkString, uint32_t> fFlattenableDict; |
| 125 uint32_t fNextIndex; |
121 }; | 126 }; |
122 | 127 |
123 #endif // SkWriteBuffer_DEFINED | 128 #endif // SkWriteBuffer_DEFINED |
OLD | NEW |