New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 610759 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Feature

Blocked on:
issue 613409
issue 613411
issue 668848

Blocking:
issue 593514



Sign in to add a comment

Verify that webgl API works with OffscreenCanvas

Project Member Reported by xidac...@chromium.org, May 10 2016

Issue description

To start, we will verify that webgl rendering works.

Starting with the following cases:
1. Rendering to OffscreenCanvas, do transferToImageBitmap, and draw it to another canvas via transferFromImageBitmap.
2. Using HTMLCanvasElement.transferControlToOffscreen, rendering from the resulting OffscreenCanvas's context, and verifying the rendering results.
3. Verify the above two cases on a worker thread.

More to follow up.
 

Comment 1 by kbr@chromium.org, May 10 2016

Summary: Verify that webgl API works with OffscreenCanvas (was: Verify that webgl API with OffscreenCanvas)
Blockedon: 613409
Blockedon: 613411
Project Member

Comment 4 by bugdroid1@chromium.org, May 20 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d30c45e8878402c605e467ce537897ef38748c98

commit d30c45e8878402c605e467ce537897ef38748c98
Author: xidachen <xidachen@chromium.org>
Date: Fri May 20 13:38:19 2016

Implement transferToImageBitmap() in WebGLRenderingContext

To verify that WebGL Rendering works with OffscreenCanvas, we need to
implement this function first.

This CL also comes with two layout tests does the following things:
1. Rendering to OffscreenCanvas, call transferToImageBitmap, and draw the
ImageBitmap to another canvas via transferFromImageBitmap.
2. Make sure the above case works on a worker thread.

These two layout tests will eventually be moved to KhronosGroup
as part of its conformance test. However, at this moment, the layout
tests serve the purpose of verifying correctness of the code changes.

BUG= 610759 
CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/1962413002
Cr-Commit-Position: refs/heads/master@{#395065}

[add] https://crrev.com/d30c45e8878402c605e467ce537897ef38748c98/third_party/WebKit/LayoutTests/fast/canvas/webgl/OffscreenCanvas-TransferToFromImageBitmap-TexImage2D-expected.txt
[add] https://crrev.com/d30c45e8878402c605e467ce537897ef38748c98/third_party/WebKit/LayoutTests/fast/canvas/webgl/OffscreenCanvas-TransferToFromImageBitmap-TexImage2D.html
[add] https://crrev.com/d30c45e8878402c605e467ce537897ef38748c98/third_party/WebKit/LayoutTests/fast/canvas/webgl/OffscreenCanvas-TransferToFromImageBitmap-expected.html
[add] https://crrev.com/d30c45e8878402c605e467ce537897ef38748c98/third_party/WebKit/LayoutTests/fast/canvas/webgl/OffscreenCanvas-TransferToFromImageBitmap-in-worker-expected.html
[add] https://crrev.com/d30c45e8878402c605e467ce537897ef38748c98/third_party/WebKit/LayoutTests/fast/canvas/webgl/OffscreenCanvas-TransferToFromImageBitmap-in-worker.html
[add] https://crrev.com/d30c45e8878402c605e467ce537897ef38748c98/third_party/WebKit/LayoutTests/fast/canvas/webgl/OffscreenCanvas-TransferToFromImageBitmap.html
[modify] https://crrev.com/d30c45e8878402c605e467ce537897ef38748c98/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
[modify] https://crrev.com/d30c45e8878402c605e467ce537897ef38748c98/third_party/WebKit/Source/core/frame/ImageBitmap.h
[modify] https://crrev.com/d30c45e8878402c605e467ce537897ef38748c98/third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.cpp
[modify] https://crrev.com/d30c45e8878402c605e467ce537897ef38748c98/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
[modify] https://crrev.com/d30c45e8878402c605e467ce537897ef38748c98/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
[modify] https://crrev.com/d30c45e8878402c605e467ce537897ef38748c98/third_party/WebKit/Source/platform/graphics/StaticBitmapImage.cpp
[modify] https://crrev.com/d30c45e8878402c605e467ce537897ef38748c98/third_party/WebKit/Source/platform/graphics/StaticBitmapImage.h

Project Member

Comment 5 by bugdroid1@chromium.org, Nov 16 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8372014fc16a378fc7452164db9b3b89fbd62909

commit 8372014fc16a378fc7452164db9b3b89fbd62909
Author: xidachen <xidachen@chromium.org>
Date: Wed Nov 16 14:20:08 2016

Make OffscreenCanvas an EventTarget

Right now OffscreenCanvas is not an EventTarget, which means that it
cannot listen to any event such as webgl context lost and restoration.

This CL makes OffscreenCanvas an EventTarget. In order to override the
pure virtual function getExecutionContext in EventTarget, we keep a
Member<ExecutionContext> in OffscreenCanvas.

We also added some layout tests here. In this CL, we only tests webgl
context lost and restoration. The layout tests here should be
upstreamed to khronos group on github later on once the spec for
OffscreenCanvas is landed. Also, notice that the context lost test in
worker verifies that all WebGL's API works in a worker.

Note that the tests we have here is pretty much copied from the webgl's
conformance tests.

BUG= 655270 ,  610759 ,  630515 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2490443002
Cr-Commit-Position: refs/heads/master@{#432478}

[add] https://crrev.com/8372014fc16a378fc7452164db9b3b89fbd62909/third_party/WebKit/LayoutTests/fast/canvas/webgl/offscreenCanvas-context-lost-restored-worker.html
[add] https://crrev.com/8372014fc16a378fc7452164db9b3b89fbd62909/third_party/WebKit/LayoutTests/fast/canvas/webgl/offscreenCanvas-context-lost-restored.html
[add] https://crrev.com/8372014fc16a378fc7452164db9b3b89fbd62909/third_party/WebKit/LayoutTests/fast/canvas/webgl/offscreenCanvas-context-lost-worker.html
[add] https://crrev.com/8372014fc16a378fc7452164db9b3b89fbd62909/third_party/WebKit/LayoutTests/fast/canvas/webgl/offscreenCanvas-context-lost.html
[modify] https://crrev.com/8372014fc16a378fc7452164db9b3b89fbd62909/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/8372014fc16a378fc7452164db9b3b89fbd62909/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/8372014fc16a378fc7452164db9b3b89fbd62909/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt
[modify] https://crrev.com/8372014fc16a378fc7452164db9b3b89fbd62909/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/8372014fc16a378fc7452164db9b3b89fbd62909/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt
[modify] https://crrev.com/8372014fc16a378fc7452164db9b3b89fbd62909/third_party/WebKit/Source/core/events/EventTargetFactory.in
[modify] https://crrev.com/8372014fc16a378fc7452164db9b3b89fbd62909/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp
[modify] https://crrev.com/8372014fc16a378fc7452164db9b3b89fbd62909/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h
[modify] https://crrev.com/8372014fc16a378fc7452164db9b3b89fbd62909/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.idl
[modify] https://crrev.com/8372014fc16a378fc7452164db9b3b89fbd62909/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvasModules.cpp
[modify] https://crrev.com/8372014fc16a378fc7452164db9b3b89fbd62909/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp

Status: Fixed (was: Started)

Comment 7 by kbr@chromium.org, Nov 30 2016

Blockedon: 668848

Sign in to add a comment