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

Unified Diff: third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.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/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp b/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
index 3aaeca3982eafcac2635ed4910aa06a91b166d2e..a5fdbf58c48403a72d2860b631fcca4acb041a48 100644
--- a/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
+++ b/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
@@ -75,10 +75,8 @@ void OffscreenCanvasFrameDispatcherImpl::setTransferableResourceToSharedBitmap(
// TODO(xlai): Optimize to avoid copying pixels. See crbug.com/651456.
// However, in the case when |image| is texture backed, this function call
// does a GPU readback which is required.
- // TODO(ccameron): Canvas should produce sRGB images.
- // https://crbug.com/672299
- image->imageForCurrentFrame(ColorBehavior::transformToGlobalTarget())
- ->readPixels(imageInfo, pixels, imageInfo.minRowBytes(), 0, 0);
+ image->imageForCurrentFrame()->readPixels(imageInfo, pixels,
+ imageInfo.minRowBytes(), 0, 0);
resource.mailbox_holder.mailbox = bitmap->id();
resource.mailbox_holder.texture_target = 0;
resource.is_software = true;
@@ -112,10 +110,8 @@ void OffscreenCanvasFrameDispatcherImpl::
return;
RefPtr<Uint8Array> dstPixels =
Uint8Array::create(dstBuffer, 0, dstBuffer->byteLength());
- // TODO(ccameron): Canvas should produce sRGB images.
- // https://crbug.com/672299
- image->imageForCurrentFrame(ColorBehavior::transformToGlobalTarget())
- ->readPixels(info, dstPixels->data(), info.minRowBytes(), 0, 0);
+ image->imageForCurrentFrame()->readPixels(info, dstPixels->data(),
+ info.minRowBytes(), 0, 0);
GLuint textureId = 0u;
gl->GenTextures(1, &textureId);

Powered by Google App Engine
This is Rietveld 408576698