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

Unified Diff: third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp

Issue 2572873002: Add ColorBehavior plumbing for 2D canvas drawImage (Closed)
Patch Set: 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/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 ddafd62e7a398a28af62161b8a158ac9bf9e65d9..5bbda9709d881e337a487b059d9f1f43b2f43778 100644
--- a/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp
+++ b/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp
@@ -1078,11 +1078,8 @@ void BaseRenderingContext2D::drawImageInternal(SkCanvas* c,
if (!imageSource->isVideoElement()) {
imagePaint.setAntiAlias(shouldDrawImageAntialiased(dstRect));
- // TODO(ccameron): Canvas should draw in sRGB by default.
- // https://crbug.com/672299
image->draw(c, imagePaint, dstRect, srcRect, DoNotRespectImageOrientation,
- Image::DoNotClampImageToSourceRect,
- ColorBehavior::transformToGlobalTarget());
+ Image::DoNotClampImageToSourceRect, drawImageColorBehavior());
} else {
c->save();
c->clipRect(dstRect);

Powered by Google App Engine
This is Rietveld 408576698