Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 5 users
Status: Fixed
Owner:
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Feature


Sign in to add a comment
Make OffscreenCanvas.commit() work from a worker.
Project Member Reported by junov@chromium.org, Dec 1 2015 Back to list
Make Offscreen.commit() work from a worker.
At this stage, it should be possible to present content from a 2D canvas to the screen from a worker.

 
Comment 1 by junov@chromium.org, Dec 1 2015
Blocking: chromium:563816
Comment 2 by xlai@chromium.org, May 13 2016
Blockedon: 611796
Comment 3 by xlai@chromium.org, Jun 10 2016
Blockedon: 619136
Comment 4 by junov@chromium.org, Aug 15 2016
Labels: OffscreenCanvas
Comment 5 by junov@chromium.org, Sep 2 2016
Owner: xlai@chromium.org
Comment 6 by xlai@chromium.org, Sep 8 2016
Blockedon: 645173
Project Member Comment 7 by bugdroid1@chromium.org, Sep 8 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/872147e3a729517162d4b155164ec1c75d942bd7

commit 872147e3a729517162d4b155164ec1c75d942bd7
Author: xlai <xlai@chromium.org>
Date: Thu Sep 08 21:38:51 2016

Submit CompositorFrame from worker

This CL enables sending compositor frame from OffscreenCanvas on worker
to browser. It also makes commit() throws InvalidStateError when user
call the function without calling transferControlToOffscreen. Two layout
tests are added.

TBR=tsepez@chromium.org
BUG= 563858 

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

[add] https://crrev.com/872147e3a729517162d4b155164ec1c75d942bd7/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-commit-invalid-call.html
[modify] https://crrev.com/872147e3a729517162d4b155164ec1c75d942bd7/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-commit-main.html
[add] https://crrev.com/872147e3a729517162d4b155164ec1c75d942bd7/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-commit-worker-expected.html
[add] https://crrev.com/872147e3a729517162d4b155164ec1c75d942bd7/third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-commit-worker.html
[modify] https://crrev.com/872147e3a729517162d4b155164ec1c75d942bd7/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp
[modify] https://crrev.com/872147e3a729517162d4b155164ec1c75d942bd7/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
[modify] https://crrev.com/872147e3a729517162d4b155164ec1c75d942bd7/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h
[modify] https://crrev.com/872147e3a729517162d4b155164ec1c75d942bd7/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.idl
[modify] https://crrev.com/872147e3a729517162d4b155164ec1c75d942bd7/third_party/WebKit/public/platform/modules/offscreencanvas/offscreen_canvas_surface.mojom

Project Member Comment 8 by bugdroid1@chromium.org, Oct 3 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/dbed4e430539a6853313b6810ea6a81a397c8556

commit dbed4e430539a6853313b6810ea6a81a397c8556
Author: xlai <xlai@chromium.org>
Date: Mon Oct 03 18:07:21 2016

Implement OffscreenCanvas.commit() on Unaccelerated 2D on worker

This CL allows access to shared_bitmap_manager on worker thread,
and thereby enabling OffscreenCanvas's unaccelerated 2d commit()
on worker.

Safety of this approach:
1. The shared_bitmap_manager is guaranteed to be created when
RenderThreadImpl's parent class ChildThreadImpl is constructed
(see ChildThreadImpl::Init()). Also,
Worker threads are created when RenderThreadImpl is alive.
Thus, on worker thread, when calling AllocateSharedBitmap(),
the shared_bitmap_manager_ is always an alive pointer.
2. When RenderThreadImpl is destroyed, its unique pointer of
RendererBlinkPlatformImpl will be destroyed, which will set the
raw pointer of shared_bitmap_manager_ to be nullptr.
Next, its parent class ChildThreadImpl will be destroyed, and
thus tearing down its unique pointer of ChildSharedBitmapManager.
Thus, the shared_bitmap_manager_ raw pointer in
RendererBlinkPlatformImpl won't be left as a dangling pointer.

BUG= 563858 
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;master.tryserver.chromium.android:android_optional_gpu_tests_rel

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

[modify] https://crrev.com/dbed4e430539a6853313b6810ea6a81a397c8556/content/renderer/renderer_blink_platform_impl.cc
[modify] https://crrev.com/dbed4e430539a6853313b6810ea6a81a397c8556/content/renderer/renderer_blink_platform_impl.h
[modify] https://crrev.com/dbed4e430539a6853313b6810ea6a81a397c8556/content/test/gpu/gpu_tests/pixel_expectations.py
[modify] https://crrev.com/dbed4e430539a6853313b6810ea6a81a397c8556/content/test/gpu/gpu_tests/pixel_test_pages.py
[modify] https://crrev.com/dbed4e430539a6853313b6810ea6a81a397c8556/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp

Comment 9 by xlai@chromium.org, Oct 20 2016
Labels: -OffscreenCanvas OffScreenCanvas
Status: Fixed
This feature is generally completed. Although there are still some rooms for optimization but those are marked in other bugs.
Sign in to add a comment