| 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..f559140a097e66170c253acaac4816fd73d7c080 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 has_display)
|
| : 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),
|
| + has_display_(has_display),
|
| 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,7 @@ 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() && has_display_ &&
|
| reference_tracker_.current_surface_id().is_valid())
|
| RemoveTopLevelRootReference(reference_tracker_.current_surface_id());
|
|
|
| @@ -81,11 +78,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 +118,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 (has_display_ && surface_id_changed)
|
| AddTopLevelRootReference(reference_tracker_.current_surface_id());
|
|
|
| // Add references based on CompositorFrame referenced surfaces. If the
|
| @@ -139,7 +131,7 @@ 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 (has_display_ && surface_id_changed && last_surface_id.is_valid())
|
| RemoveTopLevelRootReference(last_surface_id);
|
|
|
| // Remove references based on CompositorFrame referenced surfaces. If the
|
| @@ -197,14 +189,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())
|
|
|