| 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 6abe6ea087c394349ba26e4f5f0a6547d69455cb..2db64d8bee26a5548c1953903675e03451b73f08 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
|
| @@ -70,8 +70,10 @@ 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.
|
| - image->imageForCurrentFrame()->readPixels(imageInfo, pixels,
|
| - imageInfo.minRowBytes(), 0, 0);
|
| + // TODO(ccameron): Canvas should produce sRGB images.
|
| + // https://crbug.com/672299
|
| + image->imageForCurrentFrame(ColorBehavior::transformToGlobalTarget())
|
| + ->readPixels(imageInfo, pixels, imageInfo.minRowBytes(), 0, 0);
|
| resource.mailbox_holder.mailbox = bitmap->id();
|
| resource.mailbox_holder.texture_target = 0;
|
| resource.is_software = true;
|
| @@ -105,8 +107,10 @@ void OffscreenCanvasFrameDispatcherImpl::
|
| return;
|
| RefPtr<Uint8Array> dstPixels =
|
| Uint8Array::create(dstBuffer, 0, dstBuffer->byteLength());
|
| - image->imageForCurrentFrame()->readPixels(info, dstPixels->data(),
|
| - info.minRowBytes(), 0, 0);
|
| + // TODO(ccameron): Canvas should produce sRGB images.
|
| + // https://crbug.com/672299
|
| + image->imageForCurrentFrame(ColorBehavior::transformToGlobalTarget())
|
| + ->readPixels(info, dstPixels->data(), info.minRowBytes(), 0, 0);
|
|
|
| GLuint textureId = 0u;
|
| gl->GenTextures(1, &textureId);
|
|
|