New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 781351 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Mar 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Refactor SurfaceLayerBridge to decouple it from non-OffscreenCanvas use

Project Member Reported by xlai@chromium.org, Nov 3 2017

Issue description

Currently 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.
 
Components: Blink>Canvas
Project Member

Comment 2 by bugdroid1@chromium.org, 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

Comment 3 by xlai@chromium.org, Mar 23 2018

Status: Fixed (was: Assigned)
The next intended CL (https://chromium-review.googlesource.com/c/chromium/src/+/753927) was abandoned.

Sign in to add a comment