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

Issue 2212163002: Add some plumbing for the color management of canvases (Closed)

Created:
4 years, 4 months ago by Justin Novosad
Modified:
4 years, 4 months ago
CC:
ajuma+watch_chromium.org, ajuma+watch-canvas_chromium.org, blink-reviews, blink-reviews-api_chromium.org, blink-reviews-html_chromium.org, blink-reviews-paint_chromium.org, blink-reviews-platform-graphics_chromium.org, Rik, cc-bugs_chromium.org, chromium-reviews, danakj+watch_chromium.org, dglazkov+blink, dshwang, drott+blinkwatch_chromium.org, krit, f(malita), haraken, jbroman, pdr+graphicswatchlist_chromium.org, piman+watch_chromium.org, rwlbuis, Stephen Chennney, slimming-paint-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add some plumbing for the color management of canvases This change adds an experimental canvas feature for specifying a color space at context creation time. This change also adds the necessary plumbing to propagate the color space information to the SkSurface objects that back the canvas, as well as the mailboxes and compositor resources that transport the canvas contents BUG=634542 TBR=danakj NOTRY=true CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel Committed: https://crrev.com/d5e03be7f3be92a1940c19aab0664ca02ce1011f Cr-Commit-Position: refs/heads/master@{#414108}

Patch Set 1 #

Total comments: 5

Patch Set 2 : minor corrections #

Total comments: 21

Patch Set 3 : correction + refactored creation attribute plumbing #

Patch Set 4 : fix build and tests #

Total comments: 8

Patch Set 5 : fix build + feedback #

Total comments: 12

Patch Set 6 : danakj feedback #

Patch Set 7 : build fix + stlye fix #

Patch Set 8 : sepculative fix for crashing tests #

Patch Set 9 : rebase #

Patch Set 10 : big rebase after refactor #

Patch Set 11 : rebase again #

Unified diffs Side-by-side diffs Delta from patch set Stats (+295 lines, -196 lines) Patch
M cc/resources/resource_provider.cc View 1 2 3 4 5 6 7 8 5 chunks +17 lines, -5 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/canvas/canvas-colorSpace-attribute.html View 1 chunk +15 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLCanvasElement.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp View 1 2 3 4 5 6 7 8 9 10 8 chunks +13 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/core/html/canvas/CanvasContextCreationAttributes.idl View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +18 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.cpp View 1 2 3 1 chunk +59 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/paint/HTMLCanvasPainterTest.cpp View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/Canvas2DContextAttributes.idl View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.h View 1 2 3 4 5 6 7 8 2 chunks +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp View 1 2 3 4 5 6 7 8 3 chunks +6 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp View 1 18 chunks +19 lines, -19 lines 0 comments Download
D third_party/WebKit/Source/modules/canvas2d/ContextAttributeHelpers.h View 1 chunk +0 lines, -17 lines 0 comments Download
D third_party/WebKit/Source/modules/canvas2d/ContextAttributeHelpers.cpp View 1 chunk +0 lines, -16 lines 0 comments Download
M third_party/WebKit/Source/modules/imagebitmap/ImageBitmapRenderingContext.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +1 line, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/imagebitmap/ImageBitmapRenderingContext.cpp View 1 2 3 4 2 chunks +3 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/modules/modules.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h View 1 2 3 4 5 6 7 8 2 chunks +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/webgl/WebGL2RenderingContext.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webgl/WebGL2RenderingContext.cpp View 1 2 3 chunks +3 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/modules/webgl/WebGLContextAttributeHelpers.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webgl/WebGLContextAttributeHelpers.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.h View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.cpp View 1 2 4 chunks +6 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h View 1 2 3 4 5 6 7 8 5 chunks +7 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp View 1 2 3 4 5 6 7 8 9 11 chunks +20 lines, -21 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/Canvas2DImageBufferSurface.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp View 1 2 3 4 5 6 7 8 9 10 7 chunks +33 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 chunks +11 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImageBuffer.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp View 1 2 3 4 5 6 7 8 9 3 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImageBufferSurface.h View 2 chunks +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImageBufferSurface.cpp View 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.cpp View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurfaceTest.cpp View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp View 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/gpu/AcceleratedImageBufferSurface.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/gpu/AcceleratedImageBufferSurface.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/public/platform/WebExternalBitmap.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 82 (53 generated)
Justin Novosad
Reviewers: danakj -> cc senorblanco -> third_party/WebKit/Source/ chrishtr -> third_party/WebKit/public
4 years, 4 months ago (2016-08-04 23:44:32 UTC) #4
chrishtr
https://codereview.chromium.org/2212163002/diff/1/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp File third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp (right): https://codereview.chromium.org/2212163002/diff/1/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp#newcode911 third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp:911: : CanvasRenderingContext(passedCanvas, passedOffscreenCanvas, "") No namespace? https://codereview.chromium.org/2212163002/diff/1/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.h File third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.h ...
4 years, 4 months ago (2016-08-08 22:04:31 UTC) #5
chrishtr
https://codereview.chromium.org/2212163002/diff/1/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp File third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp (right): https://codereview.chromium.org/2212163002/diff/1/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp#newcode911 third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp:911: : CanvasRenderingContext(passedCanvas, passedOffscreenCanvas, "") On 2016/08/08 at 22:04:31, chrishtr ...
4 years, 4 months ago (2016-08-08 22:04:50 UTC) #6
Justin Novosad
Ping danakj + senorblanco https://codereview.chromium.org/2212163002/diff/1/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp File third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp (right): https://codereview.chromium.org/2212163002/diff/1/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp#newcode911 third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp:911: : CanvasRenderingContext(passedCanvas, passedOffscreenCanvas, "") On ...
4 years, 4 months ago (2016-08-11 19:32:57 UTC) #8
chrishtr
lgtm
4 years, 4 months ago (2016-08-11 20:22:55 UTC) #12
Stephen White
https://codereview.chromium.org/2212163002/diff/20001/cc/blink/web_external_texture_layer_impl.cc File cc/blink/web_external_texture_layer_impl.cc (right): https://codereview.chromium.org/2212163002/diff/20001/cc/blink/web_external_texture_layer_impl.cc#newcode70 cc/blink/web_external_texture_layer_impl.cc:70: // assumption: using srgb or linear-rgb Assert that assumption? ...
4 years, 4 months ago (2016-08-11 20:41:27 UTC) #13
Justin Novosad
+bajones for modules/webgl FYI: Changed context creation attribute plumbing in WebGL to defer the conversion ...
4 years, 4 months ago (2016-08-12 17:40:18 UTC) #17
bajones
modules/webgl LGTM. kbr@ gave it a verbal thumbs up as well.
4 years, 4 months ago (2016-08-12 17:50:14 UTC) #18
Justin Novosad
New Patch
4 years, 4 months ago (2016-08-12 19:15:03 UTC) #23
Stephen White
https://codereview.chromium.org/2212163002/diff/20001/third_party/WebKit/Source/modules/canvas2d/Canvas2DContextAttributes.idl File third_party/WebKit/Source/modules/canvas2d/Canvas2DContextAttributes.idl (right): https://codereview.chromium.org/2212163002/diff/20001/third_party/WebKit/Source/modules/canvas2d/Canvas2DContextAttributes.idl#newcode29 third_party/WebKit/Source/modules/canvas2d/Canvas2DContextAttributes.idl:29: [RuntimeEnabled=ExperimentalCanvasFeatures] DOMString colorSpace = "legacy-srgb"; On 2016/08/12 17:40:18, Justin ...
4 years, 4 months ago (2016-08-12 19:48:31 UTC) #26
Justin Novosad
https://codereview.chromium.org/2212163002/diff/60001/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h File third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h (right): https://codereview.chromium.org/2212163002/diff/60001/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h#newcode83 third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h:83: virtual bool hasAlpha() const { return creationAttributes().alpha(); } On ...
4 years, 4 months ago (2016-08-12 20:08:49 UTC) #27
Stephen White
LGTM
4 years, 4 months ago (2016-08-12 20:11:57 UTC) #28
danakj
What's the plan for gfx::ColorSpace vs SkColorSpace? Is blink going to produce gfx::ColorSpace or? https://codereview.chromium.org/2212163002/diff/80001/cc/blink/web_external_texture_layer_impl.cc ...
4 years, 4 months ago (2016-08-12 21:03:48 UTC) #33
Justin Novosad
4 years, 4 months ago (2016-08-15 18:03:51 UTC) #34
Justin Novosad
FYI: The plan we are considering for gfx::ColorSpace is to make it a wrapper of ...
4 years, 4 months ago (2016-08-15 18:07:04 UTC) #35
Justin Novosad
danakj, friendly ping.
4 years, 4 months ago (2016-08-18 19:29:10 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2212163002/140001
4 years, 4 months ago (2016-08-19 21:09:58 UTC) #52
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/277454)
4 years, 4 months ago (2016-08-19 23:30:30 UTC) #54
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2212163002/140001
4 years, 4 months ago (2016-08-22 21:20:26 UTC) #56
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm64_dbg_recipe/builds/116429) android_clang_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, ...
4 years, 4 months ago (2016-08-22 21:26:57 UTC) #58
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2212163002/160001
4 years, 4 months ago (2016-08-22 21:38:23 UTC) #61
commit-bot: I haz the power
Try jobs failed on following builders: chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_amd64-generic_chromium_compile_only_ng/builds/187541) mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, ...
4 years, 4 months ago (2016-08-22 21:56:43 UTC) #63
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2212163002/180001
4 years, 4 months ago (2016-08-23 21:04:33 UTC) #66
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/283200)
4 years, 4 months ago (2016-08-23 22:03:49 UTC) #68
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2212163002/200001
4 years, 4 months ago (2016-08-24 14:23:46 UTC) #71
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2212163002/200001
4 years, 4 months ago (2016-08-24 18:04:52 UTC) #75
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2212163002/200001
4 years, 4 months ago (2016-08-24 18:06:21 UTC) #78
commit-bot: I haz the power
Committed patchset #11 (id:200001)
4 years, 4 months ago (2016-08-24 18:22:33 UTC) #80
commit-bot: I haz the power
4 years, 4 months ago (2016-08-24 18:26:20 UTC) #82
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/d5e03be7f3be92a1940c19aab0664ca02ce1011f
Cr-Commit-Position: refs/heads/master@{#414108}

Powered by Google App Engine
This is Rietveld 408576698