DescriptionImplement 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
Committed: https://crrev.com/dbed4e430539a6853313b6810ea6a81a397c8556
Cr-Commit-Position: refs/heads/master@{#422460}
Patch Set 1 #Patch Set 2 : Code and test #Patch Set 3 : rebase #Patch Set 4 : style #
Total comments: 2
Patch Set 5 : rebase Nits #
Messages
Total messages: 21 (14 generated)
|