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

Issue 563816 link

Starred by 101 users

Comments by non-members will not trigger notification emails to users who starred this issue.

Issue metadata

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


Sign in to add a comment

Implement and ship the OffscreenCanvas feature

Project Member Reported by junov@chromium.org, Dec 1 2015

Issue description

Spec is a work in progress at this time.
Feature proposal: https://wiki.whatwg.org/wiki/OffscreenCanvas
Mozilla's implementation, for reference/compat: https://bugzilla.mozilla.org/attachment.cgi?id=8662255&action=diff
 
Showing comments 11 - 110 of 110 Older
Blockedon: chromium:563861
Blockedon: chromium:563863
Blockedon: chromium:563868
Blockedon: chromium:563870
Cc: jinho.b...@samsung.com
Blockedon: chromium:565077
Status: Assigned
Blockedon: chromium:585607
I don't know if if this is a separate issue or just because it's not implemented yet; OffscreenCanvasRenderingContext2D.drawImage won't accept another OffscreenCanvas as an input.
Gives error "The provided value is not of type '(HTMLImageElement or HTMLVideoElement or HTMLCanvasElement or ImageBitmap)"

Comment 20 by xlai@chromium.org, Jul 27 2016

#18: Right. We haven't have a stable spec for OffscreenCanvasRenderingContext2D yet; so right now we implement most of its functions by following existing spec of HTML canvas 2d (https://html.spec.whatwg.org/multipage/scripting.html#canvasimagesource) which states the image source can be only one of the four types mentioned above.

junov@: How do you think about having OffscreenCanvas as one of the CanvasImageSource for OffscreenCanvasRenderingContext2d in the spec?


Comment 21 by junov@chromium.org, Jul 27 2016

Blockedon: 632015

Comment 22 by junov@chromium.org, Jul 27 2016

Blockedon: 632016

Comment 23 by junov@chromium.org, Jul 27 2016

Good point, I just attached two child bugs to add OffscreenCanvas to the CanvasImageSource and ImageBitmapSource IDL union types respectively.  This will allow OffscreenCanvases to be used with drawImage, createPattern and createImageBitmap.

Comment 24 by jmedley@google.com, Jul 28 2016

Is this supposed to be one of the blocking items: https://bugs.chromium.org/p/chromium/issues/detail?id=631825

Comment 25 by junov@chromium.org, Jul 28 2016

Blockedon: 631825
Good catch.

Comment 26 by xlai@chromium.org, Oct 12 2016

Blockedon: 655177

Comment 27 by xlai@chromium.org, Oct 20 2016

Blockedon: -585607

Comment 28 by xlai@chromium.org, Oct 20 2016

Blockedon: 655278
Blockedon: 655335
Blockedon: 655270
Blockedon: 658251

Comment 32 by xlai@chromium.org, Oct 25 2016

Blockedon: 659260

Comment 33 by xlai@chromium.org, Nov 2 2016

Blockedon: 661605

Comment 34 by xlai@chromium.org, Nov 4 2016

Blockedon: 662498
Blockedon: 663916
Context2D.CanvasCompositing is in the spec. Will it be implemented before launch?

https://bugs.chromium.org/p/chromium/issues/detail?id=645748

Comment 37 by junov@chromium.org, Nov 14 2016

Blockedon: 645748
Yes, compositing will be there.  Thanks for pointing it out.

Comment 38 by junov@chromium.org, Nov 14 2016

Blockedon: 665057

Comment 39 by junov@chromium.org, Nov 14 2016

Blockedon: 664547
Blockedon: 666024

Comment 41 by junov@chromium.org, Nov 30 2016

Blockedon: 669392
globalAlpha getter/setter are missing from OffscreenCanvasRenderingContext2D
@#42: Yep globalAlpha just got fix last week: https://codereview.chromium.org/2526693003/

It should be there in the latest canary build.
Blockedon: 672571

Comment 45 by junov@chromium.org, Dec 12 2016

Blockedon: 673347

Comment 46 by junov@chromium.org, Dec 12 2016

Blockedon: 673348
Project Member

Comment 47 by bugdroid1@chromium.org, Dec 13 2016

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

commit 989e9e9435bacdc30620a2718335119791972373
Author: junov <junov@chromium.org>
Date: Tue Dec 13 19:42:22 2016

Add test to verify that OffscreenCanvas commit() retains canvas contents

BUG= 563816 

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

[add] https://crrev.com/989e9e9435bacdc30620a2718335119791972373/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-commit-retains-backing.html

Comment 48 by junov@chromium.org, Dec 16 2016

Blockedon: 646864

Comment 49 by junov@chromium.org, Dec 20 2016

Blockedon: 676131

Comment 50 by junov@chromium.org, Dec 20 2016

Blockedon: 674744

Comment 51 by xlai@chromium.org, Dec 22 2016

Blockedon: 676666

Comment 52 by xlai@chromium.org, Jan 3 2017

Blockedon: -664547
Labels: M-59
The predictability program is reviewing the top 50 starred Blink bugs this quarter, and this is #50 on that list.

Can someone give a quick summary here of the status of OffscreenCanvas?  I know work is progressing rapidly and we were originally hoping to ship in M58, right?  Is M59 now the target?

Comment 54 by xlai@chromium.org, Mar 23 2017

rbyers@: We finished most of the shipping-blocking issues for OffscreenCanvas. Now we are settling down on a spec discussion with other vendors to change the current commit() API. Once that part of spec is landed in WHATWG, as well as the implementation change + a few more conformance tests to web-platform-tests/WebGL for that change of spec, then we can ship it. I think M59 might be a bit tight a deadline; maybe M60 is a better estimate. junov@: WDYT?

Comment 55 by junov@chromium.org, Mar 23 2017

Labels: -M-59 M-60
Yeah, we are also dealing several recently discovered bugs. I think pushing to M60 is more realistic at this point. 

Comment 56 by junov@chromium.org, Mar 23 2017

Blockedon: 696223

Comment 57 by junov@chromium.org, Mar 23 2017

Blockedon: 696222

Comment 58 by junov@chromium.org, Mar 23 2017

Blockedon: 585607

Comment 59 by junov@chromium.org, Mar 23 2017

Blockedon: 697582

Comment 60 by junov@chromium.org, Mar 23 2017

Blockedon: 703673
Blockedon: 708709

Comment 62 by pacer...@gmail.com, Apr 13 2017

Am I right to say that Chrome's implementation of this will enable true offthread GPGPU?

Comment 63 by junov@chromium.org, Apr 13 2017

If you are satisfied with the OpenGL 2.0 API, then yes, this will give you offthread GPGPU. But if you want compute shaders, then you also need a next gen GPU API for the web, or a WebGL extension that exposes compute shaders.

Not sure what you mean by "true offthread", but keep in mind that the GPU itself is a monolithic resource that can only be doing one thing at a time (though that one thing may be massively parallel). So if you want your web app's UI to be interactive while it is performing a long running GPGPU task in a worker, you will have to break your GPGPU task into small chunks of work so that the GPU can interleave GPGPU work and graphics updates.

Comment 64 by junov@chromium.org, Apr 13 2017

Sorry, I meant "WebGL 2.0", not "OpenGL 2.0" in my previous comment.

Comment 65 by junov@chromium.org, Apr 26 2017

Blockedon: 715212

Comment 66 by junov@chromium.org, Apr 26 2017

Blockedon: 715757

Comment 67 by junov@chromium.org, Apr 27 2017

Blockedon: 716091

Comment 68 by junov@chromium.org, Apr 27 2017

Blockedon: 716138
Apologies if this is too off-topic, but it seems relevant to the OffscreenCanvas feature.

I've got a use case where I generate a lot of SVGs and render them to a canvas for further manipulation and extraction of ImageData. Currently this is bottlenecked on the main thread since each SVG being rendered takes ~80ms.

The only way I know of at the moment in M58 to render these SVGs is to create a Blob of the XML representation with type "image/svg+xml;charset=utf-8", then create a URL for the Blob, set the URL as the source for an Image, and after onload is finished draw the image to a CanvasRenderingContext2D.

With the work here on OffscreenCanvas will the rendering of an SVG be possible in a worker? Clearly the drawing to the canvas and further manipulation could be done in a worker thread once OffscreenCanvas is complete, but I haven't seen anything to suggest that the SVG rendering could be as well? Image is not available in the worker context, and attempting to do the rendering using createImageBitmap complains that the source Blob can't be decoded.
@69 See  issue 606317 
Blockedon: 718509
@69: OffscreenCanvas on its own does not completely solve the problem.  The issue pointed out in @70 is the missing link. Since DOM elements are not allowed to exist in workers the SVG cannot be loaded via HTMLImageElement. Instead we need to go through ImageBitmap. That is what  issue 606317  is about.
Blockedon: 730643
Blockedon: 720188

Comment 75 by junov@chromium.org, Jun 20 2017

Blockedon: 735029

Comment 76 by junov@chromium.org, Jun 21 2017

Blockedon: 735228

Comment 77 by junov@chromium.org, Jun 21 2017

Blockedon: 735470

Comment 78 by junov@chromium.org, Jul 27 2017

Blockedon: 736022

Comment 79 by junov@chromium.org, Aug 11 2017

Blockedon: 754733

Comment 80 by junov@chromium.org, Aug 11 2017

Blockedon: 754736

Comment 81 by junov@chromium.org, Aug 24 2017

Blockedon: 753483

Comment 82 by kbr@chromium.org, Sep 6 2017

Blockedon: 762647

Comment 83 by junov@chromium.org, Oct 13 2017

Blockedon: 773045

Comment 84 by junov@chromium.org, Oct 17 2017

Blockedon: -773045

Comment 85 by junov@chromium.org, Oct 27 2017

Blockedon: 778889
Blockedon: 792506
Blockedon: 803075
Labels: Hotlist-GoogleApps-P1 Hotlist-GoogleApps
Labels: -Hotlist-GoogleApps-P1

Comment 90 by junov@chromium.org, Jan 19 2018

Blockedon: 803937

Comment 91 by junov@chromium.org, Jan 19 2018

Labels: -M-60

Comment 92 by junov@chromium.org, Jan 19 2018

Blockedon: 803941
Any updates on this?
Blockedon: 838133
Blockedon: 833902
Blockedon: 838328
Owner: fs...@chromium.org
Status: Started (was: Assigned)
Project Member

Comment 98 by bugdroid1@chromium.org, May 24

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

commit 55e20b6709e25c4d095eeb9fd1e91f7b64583ea3
Author: Fernando Serboncini <fserb@chromium.org>
Date: Thu May 24 18:47:31 2018

Add new tests for RAF and Canvas commit on Workers

Bug:  563816 
Change-Id: I22d22fcd06d6bbb9de94dc891fb4b4f327720881
Reviewed-on: https://chromium-review.googlesource.com/1070210
Commit-Queue: Fernando Serboncini <fserb@chromium.org>
Reviewed-by: Justin Novosad <junov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#561573}
[modify] https://crrev.com/55e20b6709e25c4d095eeb9fd1e91f7b64583ea3/third_party/WebKit/LayoutTests/TestExpectations
[delete] https://crrev.com/082ca997aba8426949fb918d8f38f552100d96b0/third_party/WebKit/LayoutTests/external/wpt/offscreen-canvas/the-offscreen-canvas/offscreencanvas.commit-expected.txt
[modify] https://crrev.com/55e20b6709e25c4d095eeb9fd1e91f7b64583ea3/third_party/WebKit/LayoutTests/external/wpt/offscreen-canvas/the-offscreen-canvas/offscreencanvas.commit.html
[delete] https://crrev.com/082ca997aba8426949fb918d8f38f552100d96b0/third_party/WebKit/LayoutTests/external/wpt/offscreen-canvas/the-offscreen-canvas/offscreencanvas.commit.w-expected.txt
[modify] https://crrev.com/55e20b6709e25c4d095eeb9fd1e91f7b64583ea3/third_party/WebKit/LayoutTests/external/wpt/offscreen-canvas/the-offscreen-canvas/offscreencanvas.commit.w.html
[modify] https://crrev.com/55e20b6709e25c4d095eeb9fd1e91f7b64583ea3/third_party/WebKit/LayoutTests/external/wpt/offscreen-canvas/the-offscreen-canvas/offscreencanvas.resize.html
[rename] https://crrev.com/55e20b6709e25c4d095eeb9fd1e91f7b64583ea3/third_party/WebKit/LayoutTests/external/wpt/workers/WorkerGlobalScope_requestAnimationFrame.htm

Labels: Hotlist-Partner-GSuite
Labels: -Hotlist-GoogleApps
Project Member

Comment 101 by bugdroid1@chromium.org, Jun 29

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

commit 1bd453d1a64345f5cc8d42e7258d6bab2a089524
Author: Fernando Serboncini <fserb@chromium.org>
Date: Fri Jun 29 21:56:06 2018

Ship OffscreenCanvas and Worker.requestAnimationFrame

Bug:  563816 
Change-Id: I3939845a5c512f7a1975b2da7592595572cbc522
Reviewed-on: https://chromium-review.googlesource.com/1119156
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Justin Novosad <junov@chromium.org>
Commit-Queue: Fernando Serboncini <fserb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#571657}
[modify] https://crrev.com/1bd453d1a64345f5cc8d42e7258d6bab2a089524/third_party/WebKit/LayoutTests/virtual/stable/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/1bd453d1a64345f5cc8d42e7258d6bab2a089524/third_party/WebKit/LayoutTests/virtual/stable/webexposed/element-instance-property-listing-expected.txt
[modify] https://crrev.com/1bd453d1a64345f5cc8d42e7258d6bab2a089524/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-dedicated-worker-expected.txt
[modify] https://crrev.com/1bd453d1a64345f5cc8d42e7258d6bab2a089524/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-shared-worker-expected.txt
[modify] https://crrev.com/1bd453d1a64345f5cc8d42e7258d6bab2a089524/third_party/blink/renderer/platform/runtime_enabled_features.json5

Project Member

Comment 102 by bugdroid1@chromium.org, Jul 10

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

commit 903f222562799bd6e408cf95b189084bcb339675
Author: Fernando Serboncini <fserb@chromium.org>
Date: Tue Jul 10 19:56:55 2018

Put OffscreenCanvas.commit behind a flag

Bug:  563816 
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: If09eece47845488c3da241b10bceb0e63aa06f7d
Reviewed-on: https://chromium-review.googlesource.com/1131221
Commit-Queue: Fernando Serboncini <fserb@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573867}
[modify] https://crrev.com/903f222562799bd6e408cf95b189084bcb339675/third_party/WebKit/LayoutTests/virtual/stable/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/903f222562799bd6e408cf95b189084bcb339675/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-dedicated-worker-expected.txt
[modify] https://crrev.com/903f222562799bd6e408cf95b189084bcb339675/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/903f222562799bd6e408cf95b189084bcb339675/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-shared-worker-expected.txt
[modify] https://crrev.com/903f222562799bd6e408cf95b189084bcb339675/third_party/blink/renderer/modules/canvas/offscreencanvas2d/offscreen_canvas_rendering_context_2d.idl
[modify] https://crrev.com/903f222562799bd6e408cf95b189084bcb339675/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.idl
[modify] https://crrev.com/903f222562799bd6e408cf95b189084bcb339675/third_party/blink/renderer/platform/runtime_enabled_features.json5

Blockedon: 860640
Cc: fs...@chromium.org addyo@chromium.org miguelg@chromium.org kenjibaheux@chromium.org
 Issue 626361  has been merged into this issue.
Blockedon: 869569
Blockedon: 872102
Blockedon: -869569
Status: Fixed (was: Started)
With commit() being temporarily out of picture, I'm closing this.
Blockedon: 874531
Project Member

Comment 110 by bugdroid1@chromium.org, Sep 20

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

commit c5c33db0ef72b22579db2b87ab2f938347a74de1
Author: Kenneth Russell <kbr@chromium.org>
Date: Thu Sep 20 22:01:48 2018

Roll WebGL 7ca87fb..6d2f3f4

https://chromium.googlesource.com/external/khronosgroup/webgl.git/+log/7ca87fb..6d2f3f4

Tbr: kainino@chromium.org
Bug:  563816 ,  878545 
Cq-Include-Trybots: luci.chromium.try:win_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_angle_rel_ng;luci.chromium.try:win_angle_rel_ng
Change-Id: I8c8b57fef830f85f26b231a6a22576d8f9159e0f
Reviewed-on: https://chromium-review.googlesource.com/1225605
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592964}
[modify] https://crrev.com/c5c33db0ef72b22579db2b87ab2f938347a74de1/DEPS
[modify] https://crrev.com/c5c33db0ef72b22579db2b87ab2f938347a74de1/content/test/gpu/gpu_tests/webgl_conformance_revision.txt

Showing comments 11 - 110 of 110 Older

Sign in to add a comment