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 #ifndef SkPictureFlat_DEFINED | 8 #ifndef SkPictureFlat_DEFINED |
9 #define SkPictureFlat_DEFINED | 9 #define SkPictureFlat_DEFINED |
10 | 10 |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 // implemented, or SkChunkFlatController can be used to use an SkChunkAllocator
and never do | 175 // implemented, or SkChunkFlatController can be used to use an SkChunkAllocator
and never do |
176 // replacements. | 176 // replacements. |
177 // | 177 // |
178 // | 178 // |
179 /////////////////////////////////////////////////////////////////////////////// | 179 /////////////////////////////////////////////////////////////////////////////// |
180 | 180 |
181 class SkFlatData; | 181 class SkFlatData; |
182 | 182 |
183 class SkFlatController : public SkRefCnt { | 183 class SkFlatController : public SkRefCnt { |
184 public: | 184 public: |
185 SK_DECLARE_INST_COUNT(SkFlatController) | 185 |
186 | 186 |
187 SkFlatController(uint32_t writeBufferFlags = 0); | 187 SkFlatController(uint32_t writeBufferFlags = 0); |
188 virtual ~SkFlatController(); | 188 virtual ~SkFlatController(); |
189 /** | 189 /** |
190 * Return a new block of memory for the SkFlatDictionary to use. | 190 * Return a new block of memory for the SkFlatDictionary to use. |
191 * This memory is owned by the controller and has the same lifetime unless y
ou | 191 * This memory is owned by the controller and has the same lifetime unless y
ou |
192 * call unalloc(), in which case it may be freed early. | 192 * call unalloc(), in which case it may be freed early. |
193 */ | 193 */ |
194 virtual void* allocThrow(size_t bytes) = 0; | 194 virtual void* allocThrow(size_t bytes) = 0; |
195 | 195 |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
556 bool fReady; | 556 bool fReady; |
557 | 557 |
558 // For index -> SkFlatData. 0-based, while all indices in the API are 1-bas
ed. Careful! | 558 // For index -> SkFlatData. 0-based, while all indices in the API are 1-bas
ed. Careful! |
559 SkTDArray<const SkFlatData*> fIndexedData; | 559 SkTDArray<const SkFlatData*> fIndexedData; |
560 | 560 |
561 // For SkFlatData -> cached SkFlatData, which has index(). | 561 // For SkFlatData -> cached SkFlatData, which has index(). |
562 SkTDynamicHash<SkFlatData, SkFlatData, SkFlatData::HashTraits> fHash; | 562 SkTDynamicHash<SkFlatData, SkFlatData, SkFlatData::HashTraits> fHash; |
563 }; | 563 }; |
564 | 564 |
565 #endif | 565 #endif |
OLD | NEW |