Index: third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp |
diff --git a/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp b/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp |
index 9bff3199a6bb5958545553d058e49316cc0b15ec..52497791aaf9552e8fbb7df301ec3ee03608e3b1 100644 |
--- a/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp |
+++ b/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp |
@@ -66,7 +66,7 @@ SkData* DecodingImageGenerator::onRefEncodedData(GrContext* ctx) |
// Other clients are serializers, which want the data even if it requires |
// copying, and even if the data is incomplete. (Otherwise they would |
// potentially need to decode the partial image in order to re-encode it.) |
- return m_data->getAsSkData().leakRef(); |
+ return m_data->getAsSkData().release(); |
} |
bool DecodingImageGenerator::onGetPixels(const SkImageInfo& info, void* pixels, size_t rowBytes, SkPMColor table[], int* tableCount) |
@@ -127,9 +127,7 @@ SkImageGenerator* DecodingImageGenerator::create(SkData* data) |
if (!decoder) |
return 0; |
- // Blink does not know Skia has already adopted |data|. |
- WTF::adopted(data); |
f(malita)
2016/08/03 19:23:04
Nice to see this gone!
|
- RefPtr<SegmentReader> segmentReader = SegmentReader::createFromSkData(data); |
+ RefPtr<SegmentReader> segmentReader = SegmentReader::createFromSkData(sk_sp<SkData>(data)); |
f(malita)
2016/08/03 19:23:05
Shouldn't this be sk_ref_sp(data)?
The prev varia
bungeman-chromium
2016/08/03 19:37:54
After taking a closer look, I think you're right h
|
decoder->setData(segmentReader.get(), true); |
if (!decoder->isSizeAvailable()) |
return 0; |