New issue
Advanced search Search tips
Starred by 3 users
Status: Fixed
Owner:
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 563816



Sign in to add a comment
[OffscreenCanvas] commit() needs to dispatch content to the main thread element
Project Member Reported by junov@chromium.org, Oct 12 2016 Back to list
In response to a recent change to the spec, we need to make sure that using a canvas element as a CanvasImageSource (drawImage/createPattern) captures content that was committed to the associated OffscreenCanvas.  the content must also be accessible via toDataURL and toBlob on the <canvas> element. And capturing a media stream from the canvas must work.

 
Comment 1 by xlai@chromium.org, Oct 12 2016
"the content must also be accessible via toDataURL and toBlob on the <canvas> element."

I'm confused. If an HTMLCanvasElement has already been transferred to OffscreenCanvas, 
do we still allow toBlob/toDataURL happen? 

If so, then this part of exception thrown
(https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp?q=toBlob&sq=package:chromium&l=795)
is not right?
Comment 2 by junov@chromium.org, Oct 13 2016
We're backtracking on this. esprehn@ made me realize that a lot of existing frameworks count on the fact that canvas contents are scrapeable from the DOM. Making this work is not hard and  it's inexpensive in terms of performance and memory.
Comment 3 by junov@chromium.org, Oct 13 2016
Clarification: we're backtracking on the decision to throw an exception
Comment 4 by xlai@chromium.org, Oct 20 2016
Cc: junov@chromium.org
 Issue 655177  has been merged into this issue.
Comment 5 by xlai@chromium.org, Oct 20 2016
Blocking: 563816
junov@: So I mark this feature to be blocking the shipment of OffscreenCanvas.
Project Member Comment 6 by bugdroid1@chromium.org, Nov 14 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/20ba52f0f6249c418d90244e3b7b1d8b317c30a4

commit 20ba52f0f6249c418d90244e3b7b1d8b317c30a4
Author: junov <junov@chromium.org>
Date: Mon Nov 14 23:13:40 2016

Synchronize OffscreenCanvas content with the placeholder canvas

This change solves the problem of propagating frames committed by
an OffscreenCanvas all the way to the placeholder canvas, whether it
be in the same script context or not.

This allows the placeholder canvas to be used as an image source,
and to be printed.

BUG= 655278 
TBR=kbr@chromium.org
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/2493673002
Cr-Commit-Position: refs/heads/master@{#431953}

[add] https://crrev.com/20ba52f0f6249c418d90244e3b7b1d8b317c30a4/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-placeholder-image-source-with-worker.html
[add] https://crrev.com/20ba52f0f6249c418d90244e3b7b1d8b317c30a4/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-placeholder-image-source.html
[modify] https://crrev.com/20ba52f0f6249c418d90244e3b7b1d8b317c30a4/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-transferControlToOffscreen.html
[add] https://crrev.com/20ba52f0f6249c418d90244e3b7b1d8b317c30a4/third_party/WebKit/LayoutTests/printing/offscreencanvas-2d-printing-expected.html
[add] https://crrev.com/20ba52f0f6249c418d90244e3b7b1d8b317c30a4/third_party/WebKit/LayoutTests/printing/offscreencanvas-2d-printing.html
[add] https://crrev.com/20ba52f0f6249c418d90244e3b7b1d8b317c30a4/third_party/WebKit/LayoutTests/printing/offscreencanvas-webgl-printing-expected.html
[add] https://crrev.com/20ba52f0f6249c418d90244e3b7b1d8b317c30a4/third_party/WebKit/LayoutTests/printing/offscreencanvas-webgl-printing.html
[modify] https://crrev.com/20ba52f0f6249c418d90244e3b7b1d8b317c30a4/third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.cpp
[modify] https://crrev.com/20ba52f0f6249c418d90244e3b7b1d8b317c30a4/third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueDeserializer.cpp
[modify] https://crrev.com/20ba52f0f6249c418d90244e3b7b1d8b317c30a4/third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializer.cpp
[modify] https://crrev.com/20ba52f0f6249c418d90244e3b7b1d8b317c30a4/third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializerTest.cpp
[modify] https://crrev.com/20ba52f0f6249c418d90244e3b7b1d8b317c30a4/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
[modify] https://crrev.com/20ba52f0f6249c418d90244e3b7b1d8b317c30a4/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
[modify] https://crrev.com/20ba52f0f6249c418d90244e3b7b1d8b317c30a4/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp
[modify] https://crrev.com/20ba52f0f6249c418d90244e3b7b1d8b317c30a4/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h
[modify] https://crrev.com/20ba52f0f6249c418d90244e3b7b1d8b317c30a4/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.cpp
[modify] https://crrev.com/20ba52f0f6249c418d90244e3b7b1d8b317c30a4/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModuleTest.cpp
[modify] https://crrev.com/20ba52f0f6249c418d90244e3b7b1d8b317c30a4/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
[modify] https://crrev.com/20ba52f0f6249c418d90244e3b7b1d8b317c30a4/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
[modify] https://crrev.com/20ba52f0f6249c418d90244e3b7b1d8b317c30a4/third_party/WebKit/Source/platform/BUILD.gn
[modify] https://crrev.com/20ba52f0f6249c418d90244e3b7b1d8b317c30a4/third_party/WebKit/Source/platform/graphics/Image.h
[modify] https://crrev.com/20ba52f0f6249c418d90244e3b7b1d8b317c30a4/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcher.h
[modify] https://crrev.com/20ba52f0f6249c418d90244e3b7b1d8b317c30a4/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
[modify] https://crrev.com/20ba52f0f6249c418d90244e3b7b1d8b317c30a4/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.h
[add] https://crrev.com/20ba52f0f6249c418d90244e3b7b1d8b317c30a4/third_party/WebKit/Source/platform/graphics/OffscreenCanvasPlaceholder.cpp
[add] https://crrev.com/20ba52f0f6249c418d90244e3b7b1d8b317c30a4/third_party/WebKit/Source/platform/graphics/OffscreenCanvasPlaceholder.h
[modify] https://crrev.com/20ba52f0f6249c418d90244e3b7b1d8b317c30a4/third_party/WebKit/Source/platform/graphics/StaticBitmapImage.h

Status: Fixed
Yay!
Sign in to add a comment