Index: src/core/SkWriteBuffer.cpp |
diff --git a/src/core/SkWriteBuffer.cpp b/src/core/SkWriteBuffer.cpp |
index 019bc247b59819aee3a4abad26f0a7625c0635b1..3d12889fa19284ebcf466751d40c4262605b9e59 100644 |
--- a/src/core/SkWriteBuffer.cpp |
+++ b/src/core/SkWriteBuffer.cpp |
@@ -236,11 +236,8 @@ SkRefCntSet* SkBinaryWriteBuffer::setTypefaceRecorder(SkRefCntSet* rec) { |
return rec; |
} |
-void SkBinaryWriteBuffer::setPixelSerializer(SkPixelSerializer* serializer) { |
- fPixelSerializer.reset(serializer); |
- if (serializer) { |
- serializer->ref(); |
- } |
+void SkBinaryWriteBuffer::setPixelSerializer(sk_sp<SkPixelSerializer> serializer) { |
+ fPixelSerializer = std::move(serializer); |
} |
void SkBinaryWriteBuffer::writeFlattenable(const SkFlattenable* flattenable) { |