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

Unified Diff: third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp

Issue 2727133002: Remove ColorBehavior argument to Image::imageForCurrentFrame (Closed)
Patch Set: Rebase Created 3 years, 9 months 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/html/HTMLCanvasElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
index 63e6b6c1df0643300ef89950c14a23c6eba6add2..413841dd2ab3079a3dab294718cf741890dad911 100644
--- a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
@@ -518,10 +518,7 @@ void HTMLCanvasElement::notifyListenersCanvasChanged() {
FloatSize());
if (status != NormalSourceImageStatus)
return;
- // TODO(ccameron): Canvas should produce sRGB images.
- // https://crbug.com/672299
- sk_sp<SkImage> image = sourceImage->imageForCurrentFrame(
- ColorBehavior::transformToGlobalTarget());
+ sk_sp<SkImage> image = sourceImage->imageForCurrentFrame();
for (CanvasDrawListener* listener : m_listeners) {
if (listener->needsNewFrame()) {
listener->sendNewFrame(image);
@@ -652,10 +649,7 @@ ImageData* HTMLCanvasElement::toImageData(SourceDrawingBuffer sourceBuffer,
snapshot = buffer()->newSkImageSnapshot(PreferNoAcceleration, reason);
} else if (placeholderFrame()) {
DCHECK(placeholderFrame()->originClean());
- // TODO(ccameron): Canvas should produce sRGB images.
- // https://crbug.com/672299
- snapshot = placeholderFrame()->imageForCurrentFrame(
- ColorBehavior::transformToGlobalTarget());
+ snapshot = placeholderFrame()->imageForCurrentFrame();
}
if (snapshot) {
@@ -1287,8 +1281,7 @@ PassRefPtr<Image> HTMLCanvasElement::getSourceImageForCanvas(
}
RefPtr<Image> image = renderingContext()->getImage(hint, reason);
if (image) {
- skImage =
- image->imageForCurrentFrame(ColorBehavior::transformToGlobalTarget());
+ skImage = image->imageForCurrentFrame();
} else {
skImage = createTransparentSkImage(size());
}
« no previous file with comments | « third_party/WebKit/Source/core/frame/ImageBitmapTest.cpp ('k') | third_party/WebKit/Source/core/html/ImageData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698