Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(775)

Unified Diff: third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp

Issue 2206263003: Remove SK_SUPPORT_LEGACY_DATA_FACTORIES. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Gotta catch 'em all. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;

Powered by Google App Engine
This is Rietveld 408576698