RESOLVED FIXED 168595
Add 'webglcontextchanged' WebGLContextEvent
https://bugs.webkit.org/show_bug.cgi?id=168595
Summary Add 'webglcontextchanged' WebGLContextEvent
Dean Jackson
Reported 2017-02-20 07:25:04 PST
Add 'webglcontextchanged' WebGLContextEvent
Attachments
Patch (14.95 KB, patch)
2017-02-20 07:35 PST, Dean Jackson
graouts: review+
Radar WebKit Bug Importer
Comment 1 2017-02-20 07:26:41 PST
Dean Jackson
Comment 2 2017-02-20 07:35:08 PST
Antoine Quint
Comment 3 2017-02-20 07:45:12 PST
Comment on attachment 302145 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=302145&action=review > Source/WebCore/platform/graphics/GraphicsContext3D.h:1434 > + // FIXME: Layering violation. Would be nicer with a bug link to go with it. > LayoutTests/fast/canvas/webgl/webglcontextchangedevent.html:1 > +<script> You could use the JS test helpers here (js-test-pre.js and js-test-post.js) which would remove some boilerplate here and the custom log function. > LayoutTests/fast/canvas/webgl/webglcontextchangedevent.html:25 > + let handleChangedEvent = (event) => { Weird to use a `let` here vs. a `const`. You could/should also just declare a function just like you are above for `log`. > LayoutTests/fast/canvas/webgl/webglcontextchangedevent.html:35 > + let gl = c.getContext("webgl"); Use `const`. > LayoutTests/fast/canvas/webgl/webglcontextchangedevent.html:40 > + let gl = document.querySelector("canvas").getContext("webgl"); Use `const`.
Dean Jackson
Comment 4 2017-02-20 07:49:40 PST
Ryan Haddad
Comment 5 2017-02-20 09:13:53 PST
Reverted r212637 for reason: This change broke iOS builds. Committed r212639: <http://trac.webkit.org/changeset/212639>
Ryan Haddad
Comment 6 2017-02-20 09:14:23 PST
(In reply to comment #5) > Reverted r212637 for reason: > > This change broke iOS builds. > > Committed r212639: <http://trac.webkit.org/changeset/212639> Link to failure: https://build.webkit.org/builders/Apple%20iOS%2010%20Simulator%20Debug%20%28Build%29/builds/4292
Jon Lee
Comment 7 2017-02-20 09:54:45 PST
Reverted r212639 for reason: Have a fix for the linker error on iOS. Committed r212650: <http://trac.webkit.org/changeset/212650>
Jon Lee
Comment 8 2017-02-20 09:57:07 PST
Fix for iOS build: Committed r212651: <http://trac.webkit.org/changeset/212651>
Kirill S. Dmitrenko
Comment 9 2017-03-09 01:38:50 PST
Am I right to say that `webglcontextchanged` works as initially proposed: as an API user I'll have to re-query context limits and capabilities and, if some's changed, recreate some resources? Or, if limits and capabilities change'll cause some of my application's resources to invalidate, `webglcontextlost`'ll be generated?
Note You need to log in before you can comment on or make changes to this bug.