Index: include/core/SkWriteBuffer.h |
diff --git a/include/core/SkWriteBuffer.h b/include/core/SkWriteBuffer.h |
index 29f923fedd187d03c0050691600fe696754c9c1a..a104ffcb1f9039b29dcc4b6d760ebe12d8dbe68b 100644 |
--- a/include/core/SkWriteBuffer.h |
+++ b/include/core/SkWriteBuffer.h |
@@ -134,12 +134,10 @@ public: |
* Set an SkPixelSerializer to store an encoded representation of pixels, |
* e.g. SkBitmaps. |
* |
- * Calls ref() on the serializer. |
- * |
* TODO: Encode SkImage pixels as well. |
*/ |
- void setPixelSerializer(SkPixelSerializer*); |
- SkPixelSerializer* getPixelSerializer() const { return fPixelSerializer; } |
+ void setPixelSerializer(sk_sp<SkPixelSerializer>); |
+ SkPixelSerializer* getPixelSerializer() const { return fPixelSerializer.get(); } |
private: |
const uint32_t fFlags; |
@@ -148,7 +146,7 @@ private: |
SkRefCntSet* fTFSet; |
- SkAutoTUnref<SkPixelSerializer> fPixelSerializer; |
+ sk_sp<SkPixelSerializer> fPixelSerializer; |
// Only used if we do not have an fFactorySet |
SkTHashMap<SkString, uint32_t> fFlattenableDict; |