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

Unified Diff: third_party/WebKit/Source/platform/graphics/ImagePattern.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/graphics/ImagePattern.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/ImagePattern.cpp b/third_party/WebKit/Source/platform/graphics/ImagePattern.cpp
index 5e108265c50fb8b64586e9ccb0af093213b203d7..9ae1fd60567713f10660a605e025ff2c733f920f 100644
--- a/third_party/WebKit/Source/platform/graphics/ImagePattern.cpp
+++ b/third_party/WebKit/Source/platform/graphics/ImagePattern.cpp
@@ -18,8 +18,12 @@ PassRefPtr<ImagePattern> ImagePattern::create(PassRefPtr<Image> image,
return adoptRef(new ImagePattern(std::move(image), repeatMode));
}
+// TODO(ccameron): ImagePattern should not draw to a globally set color space.
+// https://crbug.com/672306
ImagePattern::ImagePattern(PassRefPtr<Image> image, RepeatMode repeatMode)
- : Pattern(repeatMode), m_tileImage(image->imageForCurrentFrame()) {
+ : Pattern(repeatMode),
+ m_tileImage(image->imageForCurrentFrame(
+ ColorBehavior::transformToGlobalTarget())) {
m_previousLocalMatrix.setIdentity();
if (m_tileImage) {
// TODO(fmalita): mechanism to extract the actual SkImageInfo from an

Powered by Google App Engine
This is Rietveld 408576698