Index: src/core/SkPictureFlat.h |
diff --git a/src/core/SkPictureFlat.h b/src/core/SkPictureFlat.h |
index bd2ad2927ac1488cd735e9cbadd6032237e87555..40f6a0a803d5301671b89a42a49904a619893f5f 100644 |
--- a/src/core/SkPictureFlat.h |
+++ b/src/core/SkPictureFlat.h |
@@ -570,47 +570,4 @@ private: |
SkTDynamicHash<SkFlatData, SkFlatData, SkFlatData::HashTraits> fHash; |
}; |
-struct SkPaintFlatteningTraits { |
- static void Flatten(SkWriteBuffer& buffer, const SkPaint& paint) { paint.flatten(buffer); } |
- static void Unflatten(SkReadBuffer& buffer, SkPaint* paint) { paint->unflatten(buffer); } |
-}; |
- |
-typedef SkFlatDictionary<SkPaint, SkPaintFlatteningTraits> SkPaintDictionary; |
- |
-class SkChunkFlatController : public SkFlatController { |
-public: |
- SkChunkFlatController(size_t minSize) |
- : fHeap(minSize) |
- , fTypefaceSet(SkNEW(SkRefCntSet)) |
- , fLastAllocated(NULL) { |
- this->setTypefaceSet(fTypefaceSet); |
- this->setTypefacePlayback(&fTypefacePlayback); |
- } |
- |
- virtual void* allocThrow(size_t bytes) SK_OVERRIDE { |
- fLastAllocated = fHeap.allocThrow(bytes); |
- return fLastAllocated; |
- } |
- |
- virtual void unalloc(void* ptr) SK_OVERRIDE { |
- // fHeap can only free a pointer if it was the last one allocated. Otherwise, we'll just |
- // have to wait until fHeap is destroyed. |
- if (ptr == fLastAllocated) (void)fHeap.unalloc(ptr); |
- } |
- |
- void setupPlaybacks() const { |
- fTypefacePlayback.reset(fTypefaceSet.get()); |
- } |
- |
- void setBitmapStorage(SkBitmapHeap* heap) { |
- this->setBitmapHeap(heap); |
- } |
- |
-private: |
- SkChunkAlloc fHeap; |
- SkAutoTUnref<SkRefCntSet> fTypefaceSet; |
- void* fLastAllocated; |
- mutable SkTypefacePlayback fTypefacePlayback; |
-}; |
- |
#endif |