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

Unified Diff: third_party/WebKit/Source/platform/graphics/GraphicsContext.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/GraphicsContext.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
index 96cbd75f5ec2007e6677942899f5ebd19e94a718..710b13955cb9d2eaefb4d3cb4850f9380d3dd52d 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
@@ -812,7 +812,7 @@ void GraphicsContext::drawImage(
imagePaint.setFilterQuality(computeFilterQuality(image, dest, src));
imagePaint.setAntiAlias(shouldAntialias());
image->draw(m_canvas, imagePaint, dest, src, shouldRespectImageOrientation,
- Image::ClampImageToSourceRect);
+ Image::ClampImageToSourceRect, m_colorBehavior);
m_paintController.setImagePainted();
}
@@ -848,7 +848,7 @@ void GraphicsContext::drawImageRRect(
if (useShader) {
const SkMatrix localMatrix = SkMatrix::MakeRectToRect(
visibleSrc, dest.rect(), SkMatrix::kFill_ScaleToFit);
- useShader = image->applyShader(imagePaint, localMatrix);
+ useShader = image->applyShader(imagePaint, localMatrix, m_colorBehavior);
}
if (useShader) {
@@ -859,7 +859,7 @@ void GraphicsContext::drawImageRRect(
SkAutoCanvasRestore autoRestore(m_canvas, true);
m_canvas->clipRRect(dest, imagePaint.isAntiAlias());
image->draw(m_canvas, imagePaint, dest.rect(), srcRect, respectOrientation,
- Image::ClampImageToSourceRect);
+ Image::ClampImageToSourceRect, m_colorBehavior);
}
m_paintController.setImagePainted();

Powered by Google App Engine
This is Rietveld 408576698