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

Unified Diff: third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h

Issue 2173603003: Revert of Cancel image loads if decoding failed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/image-decoders/ImageDecoder.h
diff --git a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h
index 0a73a82315b20919cba52da038188b0b239400be..ccb3e4002a312d135e6a531401089a2cd9179c1c 100644
--- a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h
+++ b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h
@@ -94,21 +94,6 @@
GammaAndColorProfileIgnored
};
- enum class SniffResult {
- JPEG,
- PNG,
- GIF,
- WEBP,
- ICO,
- BMP,
- InsufficientData,
- Invalid
- };
-
- static SniffResult determineImageType(const char* data, size_t length);
- static SniffResult determineImageType(const SharedBuffer&);
- static SniffResult determineImageType(const SegmentReader&);
-
ImageDecoder(AlphaOption alphaOption, GammaAndColorProfileOption colorOptions, size_t maxDecodedBytes)
: m_premultiplyAlpha(alphaOption == AlphaPremultiplied)
, m_ignoreGammaAndColorProfile(colorOptions == GammaAndColorProfileIgnored)
@@ -123,7 +108,9 @@
// we can't sniff a supported type from the provided data (possibly
// because there isn't enough data yet).
// Sets m_maxDecodedBytes to Platform::maxImageDecodedBytes().
- static std::unique_ptr<ImageDecoder> create(SniffResult, AlphaOption, GammaAndColorProfileOption);
+ static std::unique_ptr<ImageDecoder> create(const char* data, size_t length, AlphaOption, GammaAndColorProfileOption);
+ static std::unique_ptr<ImageDecoder> create(const SharedBuffer&, AlphaOption, GammaAndColorProfileOption);
+ static std::unique_ptr<ImageDecoder> create(const SegmentReader&, AlphaOption, GammaAndColorProfileOption);
virtual String filenameExtension() const = 0;

Powered by Google App Engine
This is Rietveld 408576698