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

Unified Diff: third_party/WebKit/Source/core/layout/shapes/Shape.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/core/layout/shapes/Shape.cpp
diff --git a/third_party/WebKit/Source/core/layout/shapes/Shape.cpp b/third_party/WebKit/Source/core/layout/shapes/Shape.cpp
index 34a98d88c8dfa9b1c9134cce5e699f5c027afe19..364fe581de6f108af18309d79b3f03e93ac41b1a 100644
--- a/third_party/WebKit/Source/core/layout/shapes/Shape.cpp
+++ b/third_party/WebKit/Source/core/layout/shapes/Shape.cpp
@@ -243,9 +243,11 @@ std::unique_ptr<Shape> Shape::createRasterShape(Image* image,
SkPaint paint;
IntRect imageSourceRect(IntPoint(), image->size());
IntRect imageDestRect(IntPoint(), imageRect.size());
+ // TODO(ccameron): No color conversion is required here.
image->draw(imageBuffer->canvas(), paint, imageDestRect, imageSourceRect,
DoNotRespectImageOrientation,
- Image::DoNotClampImageToSourceRect);
+ Image::DoNotClampImageToSourceRect,
+ ColorBehavior::transformToGlobalTarget());
WTF::ArrayBufferContents contents;
imageBuffer->getImageData(Unmultiplied,

Powered by Google App Engine
This is Rietveld 408576698