Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
WebGL fails to initialize within an OffscreenCanvas on the main thread.
https://bugs.webkit.org/show_bug.cgi?id=249679 <rdar://problem/103572325> Reviewed by Dean Jackson. Lookup GraphicsClient using the ScriptExecutionContext instead of via HTMLCanvasElement. This handles the case where the CanvasBase is an OffscreenCanvas, but we're on the main thread (and not a worker). * LayoutTests/fast/mediacapturefromelement/CanvasCaptureMediaStream-offscreencanvas-expected.txt: * LayoutTests/http/wpt/offscreen-canvas/getContext-webgl-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/webxr/webGLCanvasContext_create_xrcompatible.https-expected.txt: * LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.getcontext-expected.txt. * LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap-expected.txt. * LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/manual/the-offscreen-canvas/offscreencanvas.transferrable-expected.txt. * LayoutTests/platform/gtk/imported/w3c/web-platform-tests/webxr/webGLCanvasContext_create_xrcompatible.https-expected.txt: Renamed from LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/webxr/webGLCanvasContext_create_xrcompatible.https-expected.txt. * LayoutTests/platform/mac-wk1/fast/mediacapturefromelement/CanvasCaptureMediaStream-offscreencanvas-expected.txt: Removed. * Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp: (WebCore::getGraphicsClient): Canonical link: https://commits.webkit.org/258222@main
- Loading branch information
Showing
12 changed files
with
40 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
|
||
PASS capture of an OffscreenCanvas with 2D context | ||
FAIL capture of an OffscreenCanvas with WebGL context null is not an object (evaluating 'gl.clearColor') | ||
FAIL capture of an OffscreenCanvas with WebGL context ctx.commit is not a function. (In 'ctx.commit()', 'ctx.commit' is undefined) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
|
||
FAIL Test getContext('webgl'). assert_true: expected true got false | ||
PASS Test getContext('webgl'). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
|
||
PASS Creating a webgl context with no device | ||
PASS Creating a webgl2 context with no device | ||
FAIL An XR-compatible webgl context can be created promise_test: Unhandled rejection with value: object "TypeError: null is not an object (evaluating 'gl.makeXRCompatible')" | ||
FAIL An XR-compatible webgl2 context can be created promise_test: Unhandled rejection with value: object "TypeError: null is not an object (evaluating 'gl.makeXRCompatible')" | ||
FAIL An XR-compatible webgl context can be created promise_test: Unhandled rejection with value: object "InvalidStateError: The object is in an invalid state." | ||
FAIL An XR-compatible webgl2 context can be created promise_test: Unhandled rejection with value: object "InvalidStateError: The object is in an invalid state." | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
PASS Test that getContext with un-supported string throws a TypeError. | ||
FAIL Test that getContext with supported string returns correct results assert_true: expected true got false | ||
FAIL Test that getContext twice with different context type returns null the second time assert_equals: expected null but got object "[object OffscreenCanvasRenderingContext2D]" | ||
PASS Test that 2dcontext.canvas should return the original OffscreenCanvas | ||
FAIL Test that webglcontext.canvas should return the original OffscreenCanvas null is not an object (evaluating 'ctx.canvas') | ||
FAIL Test that OffscreenCanvasRenderingContext2D with alpha disabled makes the OffscreenCanvas opaque assert_approx_equals: Green channel of the pixel at (5, 5) expected 127 +/- 2 but got 255 | ||
PASS Test that OffscreenCanvasRenderingContext2D with alpha enabled preserves the alpha | ||
PASS Test that 'alpha' context creation attribute is true by default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
FAIL Test that transferToImageBitmap returns an ImageBitmap with correct width and height The object is in an invalid state. | ||
FAIL Test that transferToImageBitmap returns an ImageBitmap with correct color assert_equals: Alpha channel of the pixel at (50, 25) expected 255 but got 0 | ||
PASS Test that transferToImageBitmap won't change context's property | ||
PASS Test that transferToImageBitmap preserves transform | ||
PASS Test that call transferToImageBitmap on a detached OffscreenCanvas throws an exception | ||
PASS Test that transferToImageBitmap without a context throws an exception | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
PASS Test that offscreenCanvas's size is correct after being transferred to a worker. | ||
FAIL Test that transfer an OffscreenCanvas that has a context throws exception. assert_throws_dom: function "function () { | ||
worker.postMessage({offscreenCanvas}, [offscreenCanvas]); | ||
}" did not throw | ||
PASS Test that transfer an OffscreenCanvas twice throws exception. | ||
PASS Test that calling getContext('2d') on a detached OffscreenCanvas throws exception. | ||
PASS Test that calling getContext('webgl') on a detached OffscreenCanvas throws exception. | ||
|
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters