| Index: cc/surfaces/compositor_frame_sink_support.cc
|
| diff --git a/cc/surfaces/compositor_frame_sink_support.cc b/cc/surfaces/compositor_frame_sink_support.cc
|
| index 68c69a8c9cc36cc2d7f941b4bc1d32f4879e84b8..353650bbc1106e197eb0dca1c4f1529b2cad04de 100644
|
| --- a/cc/surfaces/compositor_frame_sink_support.cc
|
| +++ b/cc/surfaces/compositor_frame_sink_support.cc
|
| @@ -22,25 +22,22 @@ CompositorFrameSinkSupport::CompositorFrameSinkSupport(
|
| CompositorFrameSinkSupportClient* client,
|
| SurfaceManager* surface_manager,
|
| const FrameSinkId& frame_sink_id,
|
| - Display* display,
|
| bool handles_frame_sink_id_invalidation,
|
| - bool needs_sync_points)
|
| + bool needs_sync_points,
|
| + bool submits_to_display_compositor)
|
| : client_(client),
|
| surface_manager_(surface_manager),
|
| frame_sink_id_(frame_sink_id),
|
| - display_(display),
|
| surface_factory_(frame_sink_id_, surface_manager_, this),
|
| handles_frame_sink_id_invalidation_(handles_frame_sink_id_invalidation),
|
| reference_tracker_(frame_sink_id),
|
| + submits_to_display_compositor_(submits_to_display_compositor),
|
| weak_factory_(this) {
|
| if (handles_frame_sink_id_invalidation_)
|
| surface_manager_->RegisterFrameSinkId(frame_sink_id_);
|
|
|
| surface_manager_->RegisterSurfaceFactoryClient(frame_sink_id_, this);
|
| surface_factory_.set_needs_sync_points(needs_sync_points);
|
| -
|
| - if (display_)
|
| - display_->Initialize(this, surface_manager_);
|
| }
|
|
|
| CompositorFrameSinkSupport::~CompositorFrameSinkSupport() {
|
| @@ -50,7 +47,8 @@ CompositorFrameSinkSupport::~CompositorFrameSinkSupport() {
|
|
|
| // For display root surfaces, the surface is no longer going to be visible
|
| // so make it unreachable from the top-level root.
|
| - if (surface_manager_->using_surface_references() && display_ &&
|
| + if (surface_manager_->using_surface_references() &&
|
| + submits_to_display_compositor_ &&
|
| reference_tracker_.current_surface_id().is_valid())
|
| RemoveTopLevelRootReference(reference_tracker_.current_surface_id());
|
|
|
| @@ -81,11 +79,6 @@ void CompositorFrameSinkSupport::SubmitCompositorFrame(
|
| const LocalSurfaceId& local_surface_id,
|
| CompositorFrame frame) {
|
| ++ack_pending_count_;
|
| - if (display_) {
|
| - display_->SetLocalSurfaceId(local_surface_id,
|
| - frame.metadata.device_scale_factor);
|
| - }
|
| -
|
| if (surface_manager_->using_surface_references()) {
|
| SurfaceId last_surface_id = reference_tracker_.current_surface_id();
|
|
|
| @@ -126,7 +119,7 @@ void CompositorFrameSinkSupport::UpdateSurfaceReferences(
|
|
|
| // If this is a display root surface and the SurfaceId is changing, make the
|
| // new SurfaceId reachable from the top-level root.
|
| - if (display_ && surface_id_changed)
|
| + if (submits_to_display_compositor_ && surface_id_changed)
|
| AddTopLevelRootReference(reference_tracker_.current_surface_id());
|
|
|
| // Add references based on CompositorFrame referenced surfaces. If the
|
| @@ -139,8 +132,10 @@ void CompositorFrameSinkSupport::UpdateSurfaceReferences(
|
| // If this is a display root surface and the SurfaceId is changing, make the
|
| // old SurfaceId unreachable from the top-level root. This needs to happen
|
| // after adding all references for the new SurfaceId.
|
| - if (display_ && surface_id_changed && last_surface_id.is_valid())
|
| + if (submits_to_display_compositor_ && surface_id_changed &&
|
| + last_surface_id.is_valid()) {
|
| RemoveTopLevelRootReference(last_surface_id);
|
| + }
|
|
|
| // Remove references based on CompositorFrame referenced surfaces. If the
|
| // SurfaceId has changed this list will be empty.
|
| @@ -197,14 +192,6 @@ void CompositorFrameSinkSupport::ForceReclaimResources() {
|
| surface_factory_.ClearSurface();
|
| }
|
|
|
| -void CompositorFrameSinkSupport::DisplayOutputSurfaceLost() {}
|
| -
|
| -void CompositorFrameSinkSupport::DisplayWillDrawAndSwap(
|
| - bool will_draw_and_swap,
|
| - const RenderPassList& render_passes) {}
|
| -
|
| -void CompositorFrameSinkSupport::DisplayDidDrawAndSwap() {}
|
| -
|
| void CompositorFrameSinkSupport::ReturnResources(
|
| const ReturnedResourceArray& resources) {
|
| if (resources.empty())
|
|
|