Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Side by Side Diff: components/display_compositor/gpu_root_compositor_frame_sink.cc

Issue 2715663007: Implement temporary reference assignment with DisplayCompositor. (Closed)
Patch Set: Cleanup. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 void GpuRootCompositorFrameSink::AddChildFrameSink( 102 void GpuRootCompositorFrameSink::AddChildFrameSink(
103 const cc::FrameSinkId& child_frame_sink_id) { 103 const cc::FrameSinkId& child_frame_sink_id) {
104 support_->AddChildFrameSink(child_frame_sink_id); 104 support_->AddChildFrameSink(child_frame_sink_id);
105 } 105 }
106 106
107 void GpuRootCompositorFrameSink::RemoveChildFrameSink( 107 void GpuRootCompositorFrameSink::RemoveChildFrameSink(
108 const cc::FrameSinkId& child_frame_sink_id) { 108 const cc::FrameSinkId& child_frame_sink_id) {
109 support_->RemoveChildFrameSink(child_frame_sink_id); 109 support_->RemoveChildFrameSink(child_frame_sink_id);
110 } 110 }
111 111
112 void GpuRootCompositorFrameSink::ClaimTemporaryReference(
113 const cc::SurfaceId& surface_id) {
114 support_->ClaimTemporaryReference(surface_id);
115 }
116
112 void GpuRootCompositorFrameSink::RequestCopyOfSurface( 117 void GpuRootCompositorFrameSink::RequestCopyOfSurface(
113 std::unique_ptr<cc::CopyOutputRequest> request) { 118 std::unique_ptr<cc::CopyOutputRequest> request) {
114 support_->RequestCopyOfSurface(std::move(request)); 119 support_->RequestCopyOfSurface(std::move(request));
115 } 120 }
116 121
117 void GpuRootCompositorFrameSink::DisplayOutputSurfaceLost() { 122 void GpuRootCompositorFrameSink::DisplayOutputSurfaceLost() {
118 // TODO(staraz): Implement this. Client should hear about context/output 123 // TODO(staraz): Implement this. Client should hear about context/output
119 // surface lost. 124 // surface lost.
120 } 125 }
121 126
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 } 161 }
157 162
158 void GpuRootCompositorFrameSink::OnPrivateConnectionLost() { 163 void GpuRootCompositorFrameSink::OnPrivateConnectionLost() {
159 private_connection_lost_ = true; 164 private_connection_lost_ = true;
160 // Request destruction of |this| only if both connections are lost. 165 // Request destruction of |this| only if both connections are lost.
161 delegate_->OnPrivateConnectionLost(support_->frame_sink_id(), 166 delegate_->OnPrivateConnectionLost(support_->frame_sink_id(),
162 client_connection_lost_); 167 client_connection_lost_);
163 } 168 }
164 169
165 } // namespace display_compositor 170 } // namespace display_compositor
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698