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

Unified Diff: third_party/WebKit/Source/platform/exported/WebImage.cpp

Issue 2559013002: Add ColorBehavior to blink::Image draw methods (Closed)
Patch Set: Rebase Created 4 years 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/exported/WebImage.cpp
diff --git a/third_party/WebKit/Source/platform/exported/WebImage.cpp b/third_party/WebKit/Source/platform/exported/WebImage.cpp
index 86c6835b3f5df84e16db0f3bfb6ad0a73c335ff4..bf86aad834f81d55e71d460b5b7baa789b0c3c49 100644
--- a/third_party/WebKit/Source/platform/exported/WebImage.cpp
+++ b/third_party/WebKit/Source/platform/exported/WebImage.cpp
@@ -132,7 +132,10 @@ WebImage::WebImage(PassRefPtr<Image> image) {
if (!image)
return;
- if (sk_sp<SkImage> skImage = image->imageForCurrentFrame())
+ // TODO(ccameron): WebImage needs to be consistent about color spaces.
+ // https://crbug.com/672315
+ if (sk_sp<SkImage> skImage =
+ image->imageForCurrentFrame(ColorBehavior::transformToGlobalTarget()))
skImage->asLegacyBitmap(&m_bitmap, SkImage::kRO_LegacyBitmapMode);
}

Powered by Google App Engine
This is Rietveld 408576698