New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 672299 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 634542
Owner:
Closed: Dec 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 667431



Sign in to add a comment

WebGL and Canvas content should render in the canvas's colorspace, and should export sRGB images or images with ICC profiles

Project Member Reported by ccameron@chromium.org, Dec 8 2016

Issue description

WebGL and Canvas content is implicitly sRGB, but currently behaves in an undefined combination of display referred, sRGB, and undefined space.

All images loaded by WebGL and Canvas should be converted to sRGB.

All images exported from WebGL and Canvas should be sRGB.
 

Comment 1 by kbr@chromium.org, Dec 8 2016

Components: Blink>Canvas Internals>GPU>WebGL Internals>GPU>Canvas2D Blink>WebGL

Comment 2 by junov@chromium.org, Dec 9 2016

Already done for 2D canvas. You get this behaviour by default when color correct rendering is enabled.  OTherwise, you just have to create the context with:
var ctx = canvas.getContext('2d', {colorSpace: 'srgb'});

For webGL, The plumbing for color space support is all there already.  The only things missing are to make WebGLRenderingContextBase and friends take into account CanvasRenderingContext::skColorSpace to infer any necessary transforms that need to be applied on texture uploads, and to plumb the colorspace down to DrawingBuffer to get the compositing right.

The code changes are trivial. Most of the work will be in writing tests.

Comment 3 by junov@chromium.org, Dec 9 2016

Actually, IIRC we discussed this, and we don't want to do any automatic colorspace transforms on texture uploads. The transforms are to be made explicit fore example, by using creatImageBitmap, is that right.  We need to put more though into how we are going to spec this for the texImage* methods.
Cc: qiankun....@intel.com

Comment 5 by junov@chromium.org, Dec 13 2016

Summary: WebGL and Canvas content should render in the canvas's colorspace, and should export sRGB images or image with ICC profiles (was: WebGL and Canvas content should render in sRGB, and should export sRGB images)

Comment 6 Deleted

Comment 7 by junov@chromium.org, Dec 13 2016

Mergedinto: 634542
Status: Duplicate (was: Assigned)
Components: -Internals>GPU>WebGL
Cc: zakerinasab@chromium.org

Sign in to add a comment