| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/display_compositor/gpu_root_compositor_frame_sink.h" | 5 #include "components/display_compositor/gpu_root_compositor_frame_sink.h" |
| 6 | 6 |
| 7 #include "cc/surfaces/compositor_frame_sink_support.h" | 7 #include "cc/surfaces/compositor_frame_sink_support.h" |
| 8 #include "cc/surfaces/display.h" | 8 #include "cc/surfaces/display.h" |
| 9 | 9 |
| 10 namespace display_compositor { | 10 namespace display_compositor { |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 void GpuRootCompositorFrameSink::Require( | 92 void GpuRootCompositorFrameSink::Require( |
| 93 const cc::LocalSurfaceId& local_surface_id, | 93 const cc::LocalSurfaceId& local_surface_id, |
| 94 const cc::SurfaceSequence& sequence) { | 94 const cc::SurfaceSequence& sequence) { |
| 95 support_->Require(local_surface_id, sequence); | 95 support_->Require(local_surface_id, sequence); |
| 96 } | 96 } |
| 97 | 97 |
| 98 void GpuRootCompositorFrameSink::Satisfy(const cc::SurfaceSequence& sequence) { | 98 void GpuRootCompositorFrameSink::Satisfy(const cc::SurfaceSequence& sequence) { |
| 99 support_->Satisfy(sequence); | 99 support_->Satisfy(sequence); |
| 100 } | 100 } |
| 101 | 101 |
| 102 void GpuRootCompositorFrameSink::AddChildFrameSink( | |
| 103 const cc::FrameSinkId& child_frame_sink_id) { | |
| 104 support_->AddChildFrameSink(child_frame_sink_id); | |
| 105 } | |
| 106 | |
| 107 void GpuRootCompositorFrameSink::RemoveChildFrameSink( | |
| 108 const cc::FrameSinkId& child_frame_sink_id) { | |
| 109 support_->RemoveChildFrameSink(child_frame_sink_id); | |
| 110 } | |
| 111 | |
| 112 void GpuRootCompositorFrameSink::RequestCopyOfSurface( | 102 void GpuRootCompositorFrameSink::RequestCopyOfSurface( |
| 113 std::unique_ptr<cc::CopyOutputRequest> request) { | 103 std::unique_ptr<cc::CopyOutputRequest> request) { |
| 114 support_->RequestCopyOfSurface(std::move(request)); | 104 support_->RequestCopyOfSurface(std::move(request)); |
| 115 } | 105 } |
| 116 | 106 |
| 117 void GpuRootCompositorFrameSink::DisplayOutputSurfaceLost() { | 107 void GpuRootCompositorFrameSink::DisplayOutputSurfaceLost() { |
| 118 // TODO(staraz): Implement this. Client should hear about context/output | 108 // TODO(staraz): Implement this. Client should hear about context/output |
| 119 // surface lost. | 109 // surface lost. |
| 120 } | 110 } |
| 121 | 111 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 } | 146 } |
| 157 | 147 |
| 158 void GpuRootCompositorFrameSink::OnPrivateConnectionLost() { | 148 void GpuRootCompositorFrameSink::OnPrivateConnectionLost() { |
| 159 private_connection_lost_ = true; | 149 private_connection_lost_ = true; |
| 160 // Request destruction of |this| only if both connections are lost. | 150 // Request destruction of |this| only if both connections are lost. |
| 161 delegate_->OnPrivateConnectionLost(support_->frame_sink_id(), | 151 delegate_->OnPrivateConnectionLost(support_->frame_sink_id(), |
| 162 client_connection_lost_); | 152 client_connection_lost_); |
| 163 } | 153 } |
| 164 | 154 |
| 165 } // namespace display_compositor | 155 } // namespace display_compositor |
| OLD | NEW |