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
Closed: Aug 21
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Feature

Sign in to add a comment

Implement and ship the OffscreenCanvas feature

Project Member Reported by, Dec 1 2015

Issue description

Spec is a work in progress at this time.
Feature proposal:
Mozilla's implementation, for reference/compat:
Showing comments 12 - 111 of 111 Older
Blockedon: chromium:563863
Blockedon: chromium:563868
Blockedon: chromium:563870
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, 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 ( 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, Jul 27 2016

Blockedon: 632015

Comment 22 by, Jul 27 2016

Blockedon: 632016

Comment 23 by, 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, Jul 28 2016

Is this supposed to be one of the blocking items:

Comment 25 by, Jul 28 2016

Blockedon: 631825
Good catch.

Comment 26 by, Oct 12 2016

Blockedon: 655177

Comment 27 by, Oct 20 2016

Blockedon: -585607

Comment 28 by, Oct 20 2016

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

Comment 32 by, Oct 25 2016

Blockedon: 659260

Comment 33 by, Nov 2 2016

Blockedon: 661605

Comment 34 by, Nov 4 2016

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

Comment 37 by, Nov 14 2016

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

Comment 38 by, Nov 14 2016

Blockedon: 665057

Comment 39 by, Nov 14 2016

Blockedon: 664547
Blockedon: 666024

Comment 41 by, Nov 30 2016

Blockedon: 669392
globalAlpha getter/setter are missing from OffscreenCanvasRenderingContext2D
@#42: Yep globalAlpha just got fix last week:

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

Comment 45 by, Dec 12 2016

Blockedon: 673347

Comment 46 by, Dec 12 2016

Blockedon: 673348
Project Member

Comment 47 by, Dec 13 2016

The following revision refers to this bug:

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

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

BUG= 563816 

Cr-Commit-Position: refs/heads/master@{#438258}


Comment 48 by, Dec 16 2016

Blockedon: 646864

Comment 49 by, Dec 20 2016

Blockedon: 676131

Comment 50 by, Dec 20 2016

Blockedon: 674744

Comment 51 by, Dec 22 2016

Blockedon: 676666

Comment 52 by, 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, 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, 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, Mar 23 2017

Blockedon: 696223

Comment 57 by, Mar 23 2017

Blockedon: 696222

Comment 58 by, Mar 23 2017

Blockedon: 585607

Comment 59 by, Mar 23 2017

Blockedon: 697582

Comment 60 by, Mar 23 2017

Blockedon: 703673
Blockedon: 708709

Comment 62 by, Apr 13 2017

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

Comment 63 by, 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, Apr 13 2017

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

Comment 65 by, Apr 26 2017

Blockedon: 715212

Comment 66 by, Apr 26 2017

Blockedon: 715757

Comment 67 by, Apr 27 2017

Blockedon: 716091

Comment 68 by, 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, Jun 20 2017

Blockedon: 735029

Comment 76 by, Jun 21 2017

Blockedon: 735228

Comment 77 by, Jun 21 2017

Blockedon: 735470

Comment 78 by, Jul 27 2017

Blockedon: 736022

Comment 79 by, Aug 11 2017

Blockedon: 754733

Comment 80 by, Aug 11 2017

Blockedon: 754736

Comment 81 by, Aug 24 2017

Blockedon: 753483

Comment 82 by, Sep 6 2017

Blockedon: 762647

Comment 83 by, Oct 13 2017

Blockedon: 773045

Comment 84 by, Oct 17 2017

Blockedon: -773045

Comment 85 by, Oct 27 2017

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

Comment 90 by, Jan 19 2018

Blockedon: 803937

Comment 91 by, Jan 19 2018

Labels: -M-60

Comment 92 by, Jan 19 2018

Blockedon: 803941
Any updates on this?

Comment 94 by, May 14 2018

Blockedon: 838133

Comment 95 by, May 14 2018

Blockedon: 833902

Comment 96 by, May 14 2018

Blockedon: 838328

Comment 97 by, May 14 2018

Status: Started (was: Assigned)
Project Member

Comment 98 by, May 24 2018

The following revision refers to this bug:

commit 55e20b6709e25c4d095eeb9fd1e91f7b64583ea3
Author: Fernando Serboncini <>
Date: Thu May 24 18:47:31 2018

Add new tests for RAF and Canvas commit on Workers

Bug:  563816 
Change-Id: I22d22fcd06d6bbb9de94dc891fb4b4f327720881
Commit-Queue: Fernando Serboncini <>
Reviewed-by: Justin Novosad <>
Cr-Commit-Position: refs/heads/master@{#561573}

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

Comment 101 by, Jun 29 2018

The following revision refers to this bug:

commit 1bd453d1a64345f5cc8d42e7258d6bab2a089524
Author: Fernando Serboncini <>
Date: Fri Jun 29 21:56:06 2018

Ship OffscreenCanvas and Worker.requestAnimationFrame

Bug:  563816 
Change-Id: I3939845a5c512f7a1975b2da7592595572cbc522
Reviewed-by: Chris Harrelson <>
Reviewed-by: Justin Novosad <>
Commit-Queue: Fernando Serboncini <>
Cr-Commit-Position: refs/heads/master@{#571657}

Project Member

Comment 102 by, Jul 10

The following revision refers to this bug:

commit 903f222562799bd6e408cf95b189084bcb339675
Author: Fernando Serboncini <>
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
Commit-Queue: Fernando Serboncini <>
Reviewed-by: Chris Harrelson <>
Cr-Commit-Position: refs/heads/master@{#573867}

Blockedon: 860640
 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, Sep 20

The following revision refers to this bug:

commit c5c33db0ef72b22579db2b87ab2f938347a74de1
Author: Kenneth Russell <>
Date: Thu Sep 20 22:01:48 2018

Roll WebGL 7ca87fb..6d2f3f4

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-by: Kenneth Russell <>
Reviewed-by: Yuly Novikov <>
Commit-Queue: Kenneth Russell <>
Cr-Commit-Position: refs/heads/master@{#592964}

Project Member

Comment 111 by, Dec 19

The following revision refers to this bug:

commit 4d1557e84992428767937e98808d3bbad915e53f
Author: James Darpinian <>
Date: Wed Dec 19 07:17:47 2018

Roll WebGL 5b6cbd7..a2b3563

Bug: 849576,  809237 ,  911918 ,  angleproject:3012 
Bug: 913301,  912842 ,  913033 ,  563816 , 788439
Bug: angleproject:3033
Change-Id: I9b257afd69d26e75d1635633f556249583fdaa52
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
Commit-Queue: James Darpinian <>
Reviewed-by: Kenneth Russell <>
Cr-Commit-Position: refs/heads/master@{#617754}

Showing comments 12 - 111 of 111 Older

Sign in to add a comment