Index: include/core/SkWriteBuffer.h |
diff --git a/include/core/SkWriteBuffer.h b/include/core/SkWriteBuffer.h |
index 4dbe17b0d9fd4b6d03a3f9da11a4452c89a31e65..5be1af86cc854cbb25e15757a9ce0dc9e72a47a3 100644 |
--- a/include/core/SkWriteBuffer.h |
+++ b/include/core/SkWriteBuffer.h |
@@ -12,6 +12,7 @@ |
#include "SkData.h" |
#include "SkPath.h" |
#include "SkPicture.h" |
+#include "SkPixelSerializer.h" |
#include "SkRefCnt.h" |
#include "SkWriter32.h" |
@@ -87,21 +88,15 @@ public: |
/** |
* Set an SkBitmapHeap to store bitmaps rather than flattening. |
* |
- * Incompatible with an EncodeBitmap function. If an EncodeBitmap function is set, setting an |
- * SkBitmapHeap will set the function to NULL in release mode and crash in debug. |
+ * Incompatible with an SkPixelSerializer. |
*/ |
void setBitmapHeap(SkBitmapHeap*); |
/** |
- * Provide a function to encode an SkBitmap to an SkData. writeBitmap will attempt to use |
- * bitmapEncoder to store the SkBitmap. If the reader does not provide a function to decode, it |
- * will not be able to restore SkBitmaps, but will still be able to read the rest of the stream. |
- * bitmapEncoder will never be called with a NULL pixelRefOffset. |
- * |
* Incompatible with the SkBitmapHeap. If an encoder is set fBitmapHeap will be set to NULL in |
* release and crash in debug. |
*/ |
- void setBitmapEncoder(SkPicture::EncodeBitmap bitmapEncoder); |
+ void setPixelSerializer(SkPixelSerializer*); |
private: |
bool isValidating() const { return SkToBool(fFlags & kValidation_Flag); } |
@@ -114,7 +109,7 @@ private: |
SkBitmapHeap* fBitmapHeap; |
SkRefCntSet* fTFSet; |
- SkPicture::EncodeBitmap fBitmapEncoder; |
+ SkAutoTUnref<SkPixelSerializer> fPixelSerializer; |
}; |
#endif // SkWriteBuffer_DEFINED |