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

Issue 1881563003: Implement OffscreenCanvas.getContext('webgl') (Closed)

Created:
4 years, 8 months ago by xidachen
Modified:
4 years, 7 months ago
CC:
chromium-reviews, blink-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement OffscreenCanvas.getContext('webgl') At this moment, getting webgl renderingcontext for offscreenCanvas is not yet implemented and this CL implements that. BUG=602391 CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel Committed: https://crrev.com/a7270ac8f1b15170a6b28b5ebf02c65beaa6374e Cr-Commit-Position: refs/heads/master@{#390368}

Patch Set 1 #

Patch Set 2 : build successfully, needs bots to test #

Patch Set 3 : layout test still doesn't work #

Patch Set 4 : offscreenCanvas.getContext('webgl') works fine under window, need bots to verify no broken test #

Patch Set 5 : offscreenCanvas.getContext('webgl') crashes on worker #

Total comments: 17

Patch Set 6 : rebase, needs to see diffs #

Patch Set 7 : add renamed files #

Patch Set 8 : no crash, but layout for worker fails #

Patch Set 9 : almost identical as PS8 #

Total comments: 3

Patch Set 10 : change to CallWith=ScriptState #

Total comments: 1

Patch Set 11 : add bug# in TODO #

Total comments: 3

Patch Set 12 : simple fuction name change #

Patch Set 13 : rebase #

Total comments: 1

Patch Set 14 : rebase and remove static_cast #

Unified diffs Side-by-side diffs Delta from patch set Stats (+166 lines, -174 lines) Patch
A + third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-getContext.html View 1 2 3 4 5 6 1 chunk +3 lines, -3 lines 0 comments Download
A + third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-getContext-expected.txt View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
A + third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-getContext-in-worker.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +7 lines, -2 lines 0 comments Download
A + third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-getContext-in-worker-expected.txt View 1 2 3 4 5 6 0 chunks +-1 lines, --1 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-getContext2D.html View 1 2 3 4 5 1 chunk +0 lines, -38 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-getContext2D-expected.txt View 1 2 3 4 5 1 chunk +0 lines, -20 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-getContext2D-in-worker.html View 1 2 3 4 5 1 chunk +0 lines, -46 lines 0 comments Download
D third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-getContext2D-in-worker-expected.txt View 1 2 3 4 5 1 chunk +0 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h View 1 2 3 4 5 6 7 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/html/canvas/CanvasRenderingContextFactory.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/core/offscreencanvas/OffscreenCanvas.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/ModulesInitializer.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvasModules.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvasModules.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +5 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvasModules.idl View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +2 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +6 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webgl/WebGL2RenderingContext.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/webgl/WebGL2RenderingContext.cpp View 1 2 3 4 5 1 chunk +11 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.h View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +47 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h View 1 2 3 4 5 8 9 3 chunks +5 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 5 chunks +56 lines, -20 lines 0 comments Download

Messages

Total messages: 52 (19 generated)
xidachen
PTAL. https://codereview.chromium.org/1881563003/diff/80001/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp File third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp (right): https://codereview.chromium.org/1881563003/diff/80001/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp#newcode519 third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp:519: contextAttributes, scriptState->getExecutionContext()->url(), 0, &glInfo)); Doing offscreenCanvas.getContext('webgl') works fine ...
4 years, 8 months ago (2016-04-20 19:31:10 UTC) #4
Justin Novosad
https://codereview.chromium.org/1881563003/diff/80001/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-getContext2D-in-worker.html File third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-getContext2D-in-worker.html (right): https://codereview.chromium.org/1881563003/diff/80001/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-getContext2D-in-worker.html#newcode15 third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-getContext2D-in-worker.html:15: self.postMessage("bCanvas.getContext('webgl') does not return [object WebGLRenderingContext]"); test is called ...
4 years, 8 months ago (2016-04-20 20:07:28 UTC) #5
xlai (Olivia)
https://codereview.chromium.org/1881563003/diff/80001/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvas.idl File third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvas.idl (right): https://codereview.chromium.org/1881563003/diff/80001/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvas.idl#newcode18 third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvas.idl:18: [CallWith=ScriptState] OffscreenRenderingContext? getContext(DOMString contextId, optional CanvasContextCreationAttributes attributes); I can ...
4 years, 8 months ago (2016-04-20 20:42:16 UTC) #6
xidachen
https://codereview.chromium.org/1881563003/diff/80001/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-getContext2D.html File third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-getContext2D.html (right): https://codereview.chromium.org/1881563003/diff/80001/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-getContext2D.html#newcode36 third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-getContext2D.html:36: var ctx4 = bCanvas.getContext("webgl"); On 2016/04/20 20:07:27, Justin Novosad ...
4 years, 8 months ago (2016-04-20 20:52:09 UTC) #7
Ken Russell (switch to Gerrit)
https://codereview.chromium.org/1881563003/diff/80001/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h File third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h (right): https://codereview.chromium.org/1881563003/diff/80001/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h#newcode145 third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h:145: class MODULES_EXPORT WebGLRenderingContextBase : public CanvasRenderingContext, public OffscreenCanvasRenderingContext, public ...
4 years, 8 months ago (2016-04-21 01:05:24 UTC) #8
xlai (Olivia)
https://codereview.chromium.org/1881563003/diff/80001/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h File third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h (right): https://codereview.chromium.org/1881563003/diff/80001/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h#newcode145 third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h:145: class MODULES_EXPORT WebGLRenderingContextBase : public CanvasRenderingContext, public OffscreenCanvasRenderingContext, public ...
4 years, 8 months ago (2016-04-21 15:31:54 UTC) #9
Ken Russell (switch to Gerrit)
https://codereview.chromium.org/1881563003/diff/80001/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h File third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h (right): https://codereview.chromium.org/1881563003/diff/80001/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h#newcode145 third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h:145: class MODULES_EXPORT WebGLRenderingContextBase : public CanvasRenderingContext, public OffscreenCanvasRenderingContext, public ...
4 years, 8 months ago (2016-04-21 19:52:01 UTC) #10
xidachen
Hi Ken, I am starting to Merge the class OffscreenCanvasRenderingContext into CanvasRenderingContext. In terms of ...
4 years, 8 months ago (2016-04-21 19:56:50 UTC) #11
Ken Russell (switch to Gerrit)
On 2016/04/21 19:56:50, xidachen wrote: > Hi Ken, > > I am starting to Merge ...
4 years, 8 months ago (2016-04-22 01:58:53 UTC) #12
xidachen
https://codereview.chromium.org/1881563003/diff/160001/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp File third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp (right): https://codereview.chromium.org/1881563003/diff/160001/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp#newcode517 third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp:517: contextAttributes, scriptState->getExecutionContext()->url(), 0, &glInfo)); kbr@, zmo@, bajones@: when calling ...
4 years, 8 months ago (2016-04-26 13:47:30 UTC) #13
Ken Russell (switch to Gerrit)
https://codereview.chromium.org/1881563003/diff/160001/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp File third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp (right): https://codereview.chromium.org/1881563003/diff/160001/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp#newcode517 third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp:517: contextAttributes, scriptState->getExecutionContext()->url(), 0, &glInfo)); On 2016/04/26 13:47:29, xidachen wrote: ...
4 years, 7 months ago (2016-04-27 10:30:47 UTC) #15
xlai (Olivia)
https://codereview.chromium.org/1881563003/diff/160001/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp File third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp (right): https://codereview.chromium.org/1881563003/diff/160001/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp#newcode515 third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp:515: ScriptState* scriptState = ScriptState::current(v8::Isolate::GetCurrent()); I need to take back ...
4 years, 7 months ago (2016-04-27 15:11:27 UTC) #16
haraken
On 2016/04/27 15:11:27, xlai (Olivia) wrote: > https://codereview.chromium.org/1881563003/diff/160001/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-27 15:12:51 UTC) #17
xidachen
kbr@, junov@: could we land this CL as it is now? With this CL, offscreenCanvas.getContext('webgl') ...
4 years, 7 months ago (2016-04-27 17:25:21 UTC) #18
Justin Novosad
lgtm for moldules/offscreencanvas and core/html
4 years, 7 months ago (2016-04-27 17:48:30 UTC) #20
Justin Novosad
https://codereview.chromium.org/1881563003/diff/180001/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-getContext-in-worker.html File third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-getContext-in-worker.html (right): https://codereview.chromium.org/1881563003/diff/180001/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-getContext-in-worker.html#newcode11 third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-getContext-in-worker.html:11: //TODO(xidachen): implement get webgl context in worker Nit: reference ...
4 years, 7 months ago (2016-04-27 17:49:24 UTC) #21
xidachen
Per offline discussion with piman@ and danakj@, it looks like the only way to create ...
4 years, 7 months ago (2016-04-27 19:53:44 UTC) #22
bajones
On 2016/04/27 19:53:44, xidachen wrote: > Per offline discussion with piman@ and danakj@, it looks ...
4 years, 7 months ago (2016-04-27 20:15:13 UTC) #23
bajones
Oops! zmo@ pointed out I forgot to include the suggestions I mentioned. :P https://codereview.chromium.org/1881563003/diff/200001/third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.cpp File ...
4 years, 7 months ago (2016-04-27 20:18:48 UTC) #24
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1881563003/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1881563003/220001
4 years, 7 months ago (2016-04-27 20:33:31 UTC) #26
xidachen
Thanks bajones@, doing dry run now, will commit once all bots are green. https://codereview.chromium.org/1881563003/diff/200001/third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.cpp File ...
4 years, 7 months ago (2016-04-27 20:34:04 UTC) #27
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios_dbg_simulator_gn on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_gn/builds/26114) ios_dbg_simulator_ninja on ...
4 years, 7 months ago (2016-04-27 20:49:31 UTC) #29
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1881563003/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1881563003/240001
4 years, 7 months ago (2016-04-28 01:15:31 UTC) #31
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-04-28 03:37:27 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1881563003/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1881563003/240001
4 years, 7 months ago (2016-04-28 10:35:27 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/174561)
4 years, 7 months ago (2016-04-28 10:42:53 UTC) #38
xidachen
haraken@: Looks like I need a LGTM for modules/ModulesInitializer.cpp. Could you please take a look? ...
4 years, 7 months ago (2016-04-28 10:45:39 UTC) #40
haraken
LGTM https://codereview.chromium.org/1881563003/diff/240001/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp File third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp (right): https://codereview.chromium.org/1881563003/diff/240001/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp#newcode22 third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp:22: : CanvasRenderingContext(static_cast<HTMLCanvasElement*>(nullptr), canvas) Is the static_cast needed?
4 years, 7 months ago (2016-04-28 11:14:50 UTC) #41
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1881563003/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1881563003/260001
4 years, 7 months ago (2016-04-28 12:40:11 UTC) #43
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-04-28 13:55:53 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1881563003/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1881563003/260001
4 years, 7 months ago (2016-04-28 13:56:33 UTC) #48
commit-bot: I haz the power
Committed patchset #14 (id:260001)
4 years, 7 months ago (2016-04-28 14:06:11 UTC) #50
commit-bot: I haz the power
4 years, 7 months ago (2016-04-30 17:18:09 UTC) #51
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/a7270ac8f1b15170a6b28b5ebf02c65beaa6374e
Cr-Commit-Position: refs/heads/master@{#390368}

Powered by Google App Engine
This is Rietveld 408576698