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

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

Issue 1309393007: [poc] redecode Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: resetColorProfileForTesting rename 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/ImageFrameGenerator.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp b/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp
index b332fd9d54f678d45843a7c906dc1d3ff6805cb7..ba2f48447787914020dbe2a2cdff8ec62dd194c7 100644
--- a/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp
+++ b/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp
@@ -280,6 +280,12 @@ void ImageFrameGenerator::setHasAlpha(size_t index, bool hasAlpha)
m_hasAlpha[index] = hasAlpha;
}
+void ImageFrameGenerator::setDeviceProfile(ColorSpaceProfile* profile)
+{
+ fprintf(stderr, "ImageFrameGenerator set device profile %p\n", profile);
+ m_deviceProfile = profile;
+}
+
bool ImageFrameGenerator::decode(size_t index, ImageDecoder** decoder, SkBitmap* bitmap)
{
TRACE_EVENT2("blink", "ImageFrameGenerator::decode", "width", m_fullSize.width(), "height", m_fullSize.height());
@@ -296,8 +302,11 @@ bool ImageFrameGenerator::decode(size_t index, ImageDecoder** decoder, SkBitmap*
if (m_imageDecoderFactory)
*decoder = m_imageDecoderFactory->create().leakPtr();
- if (!*decoder)
+ if (!*decoder) {
*decoder = ImageDecoder::create(*data, ImageDecoder::AlphaPremultiplied, ImageDecoder::GammaAndColorProfileApplied).leakPtr();
+ fprintf(stderr, "ImageFrameGenerator %p created decoder\n", this);
+ (*decoder)->setDeviceProfile(m_deviceProfile.get());
+ }
if (!*decoder)
return false;

Powered by Google App Engine
This is Rietveld 408576698