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

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

Issue 1331533002: [poc] curve-filter Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Draw layered images with a recording GraphicContext Created 5 years, 1 month 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 a9621b5a1058f9cd5e2404cb48dfd82615ab593d..3fe6795624ab2077550f62a909020da1b39a2c93 100644
--- a/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp
+++ b/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp
@@ -123,6 +123,14 @@ bool DeferredImageDecoder::hasColorProfile() const
return m_actualDecoder ? m_actualDecoder->hasColorProfile() : m_hasColorProfile;
}
+PassRefPtr<ColorSpaceProfile> DeferredImageDecoder::colorProfile() const
+{
+ if (m_actualDecoder)
+ return m_actualDecoder->colorProfile();
+
+ return m_colorProfile;
+}
+
IntSize DeferredImageDecoder::size() const
{
return m_actualDecoder ? m_actualDecoder->size() : m_size;
@@ -211,6 +219,7 @@ void DeferredImageDecoder::activateLazyDecoding()
m_size = m_actualDecoder->size();
m_filenameExtension = m_actualDecoder->filenameExtension();
m_hasColorProfile = m_actualDecoder->hasColorProfile();
+ m_colorProfile = m_hasColorProfile ? m_actualDecoder->colorProfile() : nullptr;
const bool isSingleFrame = m_actualDecoder->repetitionCount() == cAnimationNone || (m_allDataReceived && m_actualDecoder->frameCount() == 1u);
m_frameGenerator = ImageFrameGenerator::create(SkISize::Make(m_actualDecoder->decodedSize().width(), m_actualDecoder->decodedSize().height()), m_data, m_allDataReceived, !isSingleFrame);
}

Powered by Google App Engine
This is Rietveld 408576698