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

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

Issue 2070723002: Revert of Blink image-decoders: (lazy) deferred image decoding support for ICO (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/DeferredImageDecoder.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp b/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp
index dbee73d645c91727216e8c4b8875ce561abd39fc..5600cc13cc12c8c73fd6a7088e16eafc53bf2852 100644
--- a/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp
+++ b/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp
@@ -76,7 +76,6 @@
, m_repetitionCount(cAnimationNone)
, m_hasColorProfile(false)
, m_canYUVDecode(false)
- , m_hasHotSpot(false)
{
}
@@ -236,7 +235,6 @@
return;
m_size = m_actualDecoder->size();
- m_hasHotSpot = m_actualDecoder->hotSpot(m_hotSpot);
m_filenameExtension = m_actualDecoder->filenameExtension();
// JPEG images support YUV decoding: other decoders do not, WEBP could in future.
m_canYUVDecode = RuntimeEnabledFeatures::decodeToYUVEnabled() && (m_filenameExtension == "jpg");
@@ -250,7 +248,8 @@
void DeferredImageDecoder::prepareLazyDecodedFrames()
{
if (!m_actualDecoder
- || !m_actualDecoder->isSizeAvailable())
+ || !m_actualDecoder->isSizeAvailable()
+ || m_actualDecoder->filenameExtension() == "ico")
return;
activateLazyDecoding();
@@ -315,11 +314,8 @@
bool DeferredImageDecoder::hotSpot(IntPoint& hotSpot) const
{
- if (m_actualDecoder)
- return m_actualDecoder->hotSpot(hotSpot);
- if (m_hasHotSpot)
- hotSpot = m_hotSpot;
- return m_hasHotSpot;
+ // TODO: Implement.
+ return m_actualDecoder ? m_actualDecoder->hotSpot(hotSpot) : false;
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698