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

Issue 1856933002: WebGL GL_RGB emulation to support IOSurfaces on Mac. (Closed)

Created:
4 years, 8 months ago by erikchen
Modified:
4 years, 7 months ago
CC:
chromium-reviews, krit, pdr+graphicswatchlist_chromium.org, drott+blinkwatch_chromium.org, danakj+watch_chromium.org, blink-reviews-platform-graphics_chromium.org, dshwang, jbroman, Justin Novosad, haraken, Rik, f(malita), blink-reviews, piman+watch_chromium.org, kinuko+watch, Stephen Chennney, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

WebGL GL_RGB emulation to support IOSurface back buffers on Mac. This CL creates a client side implementation of GL_RGB emulation of the WebGL back buffer. The emulation is necessary because GL_RGB IOSurfaces don't work correctly. The emulation is composed of several simple steps: 1. The service side is told that the back buffer has format GL_RGB, but it will create a GL_RGBA texture as per the chromium_image_rgb_emulation capability. 2. When the back buffer is first created, its alpha channel is cleared ot 1. 3. Any time the back buffer would be written to, the alpha channel of the color mask is set to 0. 4. Queries about the alpha channel of the back buffer are modified to return the correct result. Explicit multisample renderbuffer resolve takes a different path. 1. The back buffer is still created with emulated format GL_RGB. 2. The renderbuffer is given format GL_RGB. 3. During resolution, the renderbuffer is blitted to an intermediate non-multisample renderbuffer with format GL_RGBA. 4. The intermediate renderbuffer is then blitted to the destination texture. The multisample path uses an extra blit. Theoretically, it should be possible to only use a single blit by using glColorMask() just like the non-multisample case. Driver bugs in ATI gpus make this solution not universally applicable. BUG=595948 CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel Committed: https://crrev.com/7e3811e8e71885af851e4b5a444a2715756de96e Cr-Commit-Position: refs/heads/master@{#391428}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : Add error checking. #

Patch Set 5 : Full client side implementation of GL_RGB emulation. #

Total comments: 1

Patch Set 6 : Copy of patchset 1. Mostly client side implementation of RGB emulation. #

Patch Set 7 : Remove more format checking that should be service side. #

Patch Set 8 : Remove whitespace. #

Patch Set 9 : Rebase. #

Patch Set 10 : Rebase and use RGB render buffer. #

Patch Set 11 : Fix GN. #

Patch Set 12 : Intermediate Renderbuffer. #

Patch Set 13 : Fix test. #

Patch Set 14 : Clean up. #

Total comments: 18

Patch Set 15 : Comments from zmo and kbr. #

Patch Set 16 : Removing logging. #

Patch Set 17 : Initialize to 0. #

Total comments: 2

Patch Set 18 : Comments from kbr. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+211 lines, -17 lines) Patch
M third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +13 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 15 chunks +39 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +41 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 16 chunks +113 lines, -15 lines 0 comments Download

Messages

Total messages: 60 (29 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1856933002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1856933002/20001
4 years, 8 months ago (2016-04-04 20:09:10 UTC) #3
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-04 23:42:33 UTC) #5
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1856933002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1856933002/40001
4 years, 8 months ago (2016-04-05 18:34:00 UTC) #7
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1856933002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1856933002/60001
4 years, 8 months ago (2016-04-05 19:52:54 UTC) #10
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1856933002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1856933002/80001
4 years, 8 months ago (2016-04-05 20:22:34 UTC) #12
erikchen
kbr: Please review. The code that's not specific to the CHROMIUMImage extension gets tested heavily ...
4 years, 8 months ago (2016-04-05 20:23:55 UTC) #14
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-05 22:35:45 UTC) #16
Ken Russell (switch to Gerrit)
Thanks for putting this together. The earlier patch sets looked OK but the current direction ...
4 years, 8 months ago (2016-04-06 00:02:53 UTC) #17
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1856933002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1856933002/160001
4 years, 8 months ago (2016-04-18 17:26:00 UTC) #20
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/212911)
4 years, 8 months ago (2016-04-18 19:20:59 UTC) #22
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1856933002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1856933002/180001
4 years, 8 months ago (2016-04-26 00:31:08 UTC) #24
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_chromium_gn_compile_dbg on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_chromium_gn_compile_dbg/builds/56560) android_chromium_gn_compile_rel on ...
4 years, 8 months ago (2016-04-26 00:37:23 UTC) #26
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1856933002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1856933002/200001
4 years, 8 months ago (2016-04-26 00:54:11 UTC) #28
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/217210)
4 years, 8 months ago (2016-04-26 03:15:07 UTC) #30
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1856933002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1856933002/220001
4 years, 7 months ago (2016-04-27 21:10:20 UTC) #32
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/218613)
4 years, 7 months ago (2016-04-27 23:12:22 UTC) #34
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1856933002/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1856933002/240001
4 years, 7 months ago (2016-04-28 17:33:50 UTC) #36
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1856933002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1856933002/260001
4 years, 7 months ago (2016-04-28 18:02:02 UTC) #39
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-04-28 19:27:12 UTC) #42
erikchen
kbr: Please review.
4 years, 7 months ago (2016-04-28 19:57:42 UTC) #43
Ken Russell (switch to Gerrit)
Thanks for revising this. It looks pretty good overall. Apologies, at a conference this week ...
4 years, 7 months ago (2016-04-29 09:33:09 UTC) #45
Zhenyao Mo
Besides kbr's comments, which I agree, I have a couple more. https://codereview.chromium.org/1856933002/diff/260001/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp File third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp (right): ...
4 years, 7 months ago (2016-04-29 22:54:16 UTC) #46
erikchen
kbr, zmo: PTAL https://codereview.chromium.org/1856933002/diff/260001/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp File third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp (right): https://codereview.chromium.org/1856933002/diff/260001/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp#newcode127 third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp:127: class ScopedRGBEmulationColorMask { On 2016/04/29 22:54:15, ...
4 years, 7 months ago (2016-05-03 22:58:08 UTC) #48
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1856933002/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1856933002/320001
4 years, 7 months ago (2016-05-03 22:58:23 UTC) #49
Ken Russell (switch to Gerrit)
Very nice. Thanks for pushing this forward. Does your new test catch the bug that ...
4 years, 7 months ago (2016-05-03 23:32:27 UTC) #50
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-04 00:05:24 UTC) #52
erikchen
On 2016/05/03 23:32:27, Ken Russell wrote: > Very nice. Thanks for pushing this forward. > ...
4 years, 7 months ago (2016-05-04 00:22:54 UTC) #53
erikchen
https://codereview.chromium.org/1856933002/diff/320001/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h File third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h (right): https://codereview.chromium.org/1856933002/diff/320001/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h#newcode141 third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h:141: // This class uses the color mask to prevents ...
4 years, 7 months ago (2016-05-04 00:23:11 UTC) #54
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1856933002/340001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1856933002/340001
4 years, 7 months ago (2016-05-04 00:24:08 UTC) #57
commit-bot: I haz the power
Committed patchset #18 (id:340001)
4 years, 7 months ago (2016-05-04 03:02:15 UTC) #58
commit-bot: I haz the power
4 years, 7 months ago (2016-05-04 03:03:16 UTC) #60
Message was sent while issue was closed.
Patchset 18 (id:??) landed as
https://crrev.com/7e3811e8e71885af851e4b5a444a2715756de96e
Cr-Commit-Position: refs/heads/master@{#391428}

Powered by Google App Engine
This is Rietveld 408576698