| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 void GpuRootCompositorFrameSink::SetNeedsBeginFrame(bool needs_begin_frame) { | 82 void GpuRootCompositorFrameSink::SetNeedsBeginFrame(bool needs_begin_frame) { |
| 83 support_->SetNeedsBeginFrame(needs_begin_frame); | 83 support_->SetNeedsBeginFrame(needs_begin_frame); |
| 84 } | 84 } |
| 85 | 85 |
| 86 void GpuRootCompositorFrameSink::SubmitCompositorFrame( | 86 void GpuRootCompositorFrameSink::SubmitCompositorFrame( |
| 87 const cc::LocalSurfaceId& local_surface_id, | 87 const cc::LocalSurfaceId& local_surface_id, |
| 88 cc::CompositorFrame frame) { | 88 cc::CompositorFrame frame) { |
| 89 support_->SubmitCompositorFrame(local_surface_id, std::move(frame)); | 89 support_->SubmitCompositorFrame(local_surface_id, std::move(frame)); |
| 90 } | 90 } |
| 91 | 91 |
| 92 void GpuRootCompositorFrameSink::ClaimTemporaryReference( |
| 93 const cc::SurfaceId& surface_id) { |
| 94 support_->ClaimTemporaryReference(surface_id); |
| 95 } |
| 96 |
| 92 void GpuRootCompositorFrameSink::RequestCopyOfSurface( | 97 void GpuRootCompositorFrameSink::RequestCopyOfSurface( |
| 93 std::unique_ptr<cc::CopyOutputRequest> request) { | 98 std::unique_ptr<cc::CopyOutputRequest> request) { |
| 94 support_->RequestCopyOfSurface(std::move(request)); | 99 support_->RequestCopyOfSurface(std::move(request)); |
| 95 } | 100 } |
| 96 | 101 |
| 97 void GpuRootCompositorFrameSink::DisplayOutputSurfaceLost() { | 102 void GpuRootCompositorFrameSink::DisplayOutputSurfaceLost() { |
| 98 // TODO(staraz): Implement this. Client should hear about context/output | 103 // TODO(staraz): Implement this. Client should hear about context/output |
| 99 // surface lost. | 104 // surface lost. |
| 100 } | 105 } |
| 101 | 106 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 } | 141 } |
| 137 | 142 |
| 138 void GpuRootCompositorFrameSink::OnPrivateConnectionLost() { | 143 void GpuRootCompositorFrameSink::OnPrivateConnectionLost() { |
| 139 private_connection_lost_ = true; | 144 private_connection_lost_ = true; |
| 140 // Request destruction of |this| only if both connections are lost. | 145 // Request destruction of |this| only if both connections are lost. |
| 141 delegate_->OnPrivateConnectionLost(support_->frame_sink_id(), | 146 delegate_->OnPrivateConnectionLost(support_->frame_sink_id(), |
| 142 client_connection_lost_); | 147 client_connection_lost_); |
| 143 } | 148 } |
| 144 | 149 |
| 145 } // namespace display_compositor | 150 } // namespace display_compositor |
| OLD | NEW |