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/viz/frame_sinks/gpu_root_compositor_frame_sink.h" | 5 #include "components/viz/frame_sinks/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 viz { | 10 namespace viz { |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 DCHECK(display_); | 68 DCHECK(display_); |
69 display_->SetOutputIsSecure(secure); | 69 display_->SetOutputIsSecure(secure); |
70 } | 70 } |
71 | 71 |
72 void GpuRootCompositorFrameSink::SetLocalSurfaceId( | 72 void GpuRootCompositorFrameSink::SetLocalSurfaceId( |
73 const cc::LocalSurfaceId& local_surface_id, | 73 const cc::LocalSurfaceId& local_surface_id, |
74 float scale_factor) { | 74 float scale_factor) { |
75 display_->SetLocalSurfaceId(local_surface_id, scale_factor); | 75 display_->SetLocalSurfaceId(local_surface_id, scale_factor); |
76 } | 76 } |
77 | 77 |
78 void GpuRootCompositorFrameSink::EvictFrame() { | 78 void GpuRootCompositorFrameSink::EvictCurrentSurface() { |
79 support_->EvictFrame(); | 79 support_->EvictCurrentSurface(); |
80 } | 80 } |
81 | 81 |
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)); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 } | 144 } |
145 | 145 |
146 void GpuRootCompositorFrameSink::OnPrivateConnectionLost() { | 146 void GpuRootCompositorFrameSink::OnPrivateConnectionLost() { |
147 private_connection_lost_ = true; | 147 private_connection_lost_ = true; |
148 // Request destruction of |this| only if both connections are lost. | 148 // Request destruction of |this| only if both connections are lost. |
149 delegate_->OnPrivateConnectionLost(support_->frame_sink_id(), | 149 delegate_->OnPrivateConnectionLost(support_->frame_sink_id(), |
150 client_connection_lost_); | 150 client_connection_lost_); |
151 } | 151 } |
152 | 152 |
153 } // namespace viz | 153 } // namespace viz |
OLD | NEW |