Refactor SurfaceLayerBridge to decouple it from non-OffscreenCanvas use |
||
Issue descriptionCurrently SurfaceLayerBridge contains a lot of OffscreenCanvas-specific code. But this CL https://chromium-review.googlesource.com/c/chromium/src/+/592398 has introduced src/third_party/WebKit/Source/platform/exported/WebSurfaceLayerBridge.cpp which defines std::unique_ptr<WebSurfaceLayerBridge> WebSurfaceLayerBridge::Create( WebLayerTreeView* layer_tree_view, WebSurfaceLayerBridgeObserver* observer) { return std::make_unique<SurfaceLayerBridge>(layer_tree_view, observer); } and use it in src/content/renderer/media/media_factory.cc This call to SurfaceLayerBridge's constructor (which is essentially setting up OffscreenCanvasProvider in display compositor) in media factory is wrong. We should correct this back to make SurfaceLayerBridge used only in OffscreenCanvas. However, we should keep the WebSurfaceLayerBridge, an abstract class, in place; and it could be used in video submission work or other places as needed.
,
Nov 10 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5d801df964850de2963e19b5e2499d7bded97625 commit 5d801df964850de2963e19b5e2499d7bded97625 Author: xlai <xlai@chromium.org> Date: Fri Nov 10 22:25:58 2017 Rename OnWebLayerReplaced to OnWebLayerUpdated The current function name in SurfaceLayerBridgeObserver is misleading-- the function is called in SurfaceLayerBridge whenever the WebLayer has something changed, either a new SurfaceLayer is initialized or a resizing happens on OffscreenCanvas. Bug: 781351 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Change-Id: I07056572bcbaff0f2b265c65bbee4d18d331618d Reviewed-on: https://chromium-review.googlesource.com/763767 Reviewed-by: Philip Rogers <pdr@chromium.org> Reviewed-by: Frank Liberato <liberato@chromium.org> Commit-Queue: Olivia Lai <xlai@chromium.org> Cr-Commit-Position: refs/heads/master@{#515716} [modify] https://crrev.com/5d801df964850de2963e19b5e2499d7bded97625/media/blink/webmediaplayer_impl.cc [modify] https://crrev.com/5d801df964850de2963e19b5e2499d7bded97625/media/blink/webmediaplayer_impl.h [modify] https://crrev.com/5d801df964850de2963e19b5e2499d7bded97625/media/blink/webmediaplayer_impl_unittest.cc [modify] https://crrev.com/5d801df964850de2963e19b5e2499d7bded97625/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp [modify] https://crrev.com/5d801df964850de2963e19b5e2499d7bded97625/third_party/WebKit/Source/core/html/HTMLCanvasElement.h [modify] https://crrev.com/5d801df964850de2963e19b5e2499d7bded97625/third_party/WebKit/Source/platform/graphics/SurfaceLayerBridge.cpp [modify] https://crrev.com/5d801df964850de2963e19b5e2499d7bded97625/third_party/WebKit/public/platform/WebSurfaceLayerBridge.h
,
Mar 23 2018
The next intended CL (https://chromium-review.googlesource.com/c/chromium/src/+/753927) was abandoned. |
||
►
Sign in to add a comment |
||
Comment 1 by dtapu...@chromium.org
, Nov 10 2017