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

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

Issue 2787053004: Respect colorSpace in DecodingImageGenerator::onGetPixels() (Closed)
Patch Set: Response to comments Created 3 years, 8 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 5a1acc7ac72b379ededa4592896b96f8820055ae..57c4aaae04f1b79597f0fc005fb14248246d9d88 100644
--- a/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp
+++ b/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp
@@ -271,11 +271,12 @@ void DeferredImageDecoder::activateLazyDecoding() {
const bool isSingleFrame =
m_actualDecoder->repetitionCount() == cAnimationNone ||
(m_allDataReceived && m_actualDecoder->frameCount() == 1u);
- const SkISize decodedSize =
- SkISize::Make(m_actualDecoder->decodedSize().width(),
- m_actualDecoder->decodedSize().height());
+ const SkImageInfo info = SkImageInfo::Make(
scroggo_chromium 2017/04/07 18:06:06 nit: You could use MakeN32Premul (which has a flav
msarett1 2017/04/10 14:42:45 Acknowledged.
+ m_actualDecoder->decodedSize().width(),
+ m_actualDecoder->decodedSize().height(), kN32_SkColorType,
+ kPremul_SkAlphaType, m_colorSpaceForSkImages);
m_frameGenerator = ImageFrameGenerator::create(
- decodedSize, !isSingleFrame, m_actualDecoder->colorBehavior());
+ info, !isSingleFrame, m_actualDecoder->colorBehavior());
}
void DeferredImageDecoder::prepareLazyDecodedFrames() {

Powered by Google App Engine
This is Rietveld 408576698