[webkit-changes] [WebKit/WebKit] 355b4e: WebGL OffscreenCanvas returns previously created W...
Kimmo Kinnunen
noreply at github.com
Tue Dec 5 05:13:22 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 355b4e8956f0c1bd5cdbdadae91036cb366da07e
https://github.com/WebKit/WebKit/commit/355b4e8956f0c1bd5cdbdadae91036cb366da07e
Author: Kimmo Kinnunen <kkinnunen at apple.com>
Date: 2023-12-05 (Tue, 05 Dec 2023)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.html
M LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext.worker.js
M Source/WebCore/html/OffscreenCanvas.cpp
M Source/WebCore/html/OffscreenCanvas.h
Log Message:
-----------
WebGL OffscreenCanvas returns previously created WebGL1 context when asking for WebGL2
https://bugs.webkit.org/show_bug.cgi?id=265656
rdar://problem/119028794
Reviewed by Dan Glastonbury.
If OffscreenCanvas has "webgl" contextId, it should return null
for "webgl2" and vice versa.
Simplify all context creation casts and checks with pattern:
if (!m_context)
.. try create context
if (m_context is correct type)
return the type
return nullopt
Remove redundant createContextWebGL createContextWebGPU functions,
they were one-line functions that did not clarify anything.
* Source/WebCore/html/OffscreenCanvas.cpp:
(WebCore::OffscreenCanvas::getContext):
(WebCore::OffscreenCanvas::createContextWebGL): Deleted.
(WebCore::OffscreenCanvas::createContextWebGPU): Deleted.
* Source/WebCore/html/OffscreenCanvas.h:
Canonical link: https://commits.webkit.org/271546@main
More information about the webkit-changes
mailing list