Chromium Code Reviews| Index: third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp |
| diff --git a/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp b/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp |
| index d3fb0e25fd12d224c0cfb32603fb0776ed59ae46..ddafd62e7a398a28af62161b8a158ac9bf9e65d9 100644 |
| --- a/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp |
| +++ b/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp |
| @@ -1078,8 +1078,11 @@ void BaseRenderingContext2D::drawImageInternal(SkCanvas* c, |
| if (!imageSource->isVideoElement()) { |
| imagePaint.setAntiAlias(shouldDrawImageAntialiased(dstRect)); |
| + // TODO(ccameron): Canvas should draw in sRGB by default. |
|
Justin Novosad
2016/12/09 02:17:35
Actually, we want to use whatever the canvas's col
|
| + // https://crbug.com/672299 |
| image->draw(c, imagePaint, dstRect, srcRect, DoNotRespectImageOrientation, |
| - Image::DoNotClampImageToSourceRect); |
| + Image::DoNotClampImageToSourceRect, |
| + ColorBehavior::transformToGlobalTarget()); |
|
Justin Novosad
2016/12/09 02:17:35
I am concerned about this approach, I understand t
ccameron
2016/12/09 03:30:56
It is true, as you mention, that, if two different
|
| } else { |
| c->save(); |
| c->clipRect(dstRect); |