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

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

Issue 2930513004: [WIP] Move ImageDecoders to SkCodec
Patch Set: Adding check for decoder creation Created 3 years, 6 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/ImageSource.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/ImageSource.cpp b/third_party/WebKit/Source/platform/graphics/ImageSource.cpp
index ccac03fb0562d51ee5719e936f8a29646d1135b0..b658b797297970a213008d22ef5d329c1261f502 100644
--- a/third_party/WebKit/Source/platform/graphics/ImageSource.cpp
+++ b/third_party/WebKit/Source/platform/graphics/ImageSource.cpp
@@ -60,8 +60,7 @@ bool ImageSource::SetData(RefPtr<SharedBuffer> data, bool all_data_received) {
ImageDecoder::kAlphaPremultiplied,
decoder_color_behavior_);
- // Insufficient data is not a failure.
- return decoder_ || !ImageDecoder::HasSufficientDataToSniffImageType(*data);
+ return decoder_ ? true : false;
}
String ImageSource::FilenameExtension() const {

Powered by Google App Engine
This is Rietveld 408576698