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

Side by Side Diff: components/display_compositor/gpu_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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_compositor_frame_sink.h" 5 #include "components/display_compositor/gpu_compositor_frame_sink.h"
6 6
7 #include "cc/surfaces/surface_reference.h"
8
9 namespace display_compositor { 7 namespace display_compositor {
10 8
11 GpuCompositorFrameSink::GpuCompositorFrameSink( 9 GpuCompositorFrameSink::GpuCompositorFrameSink(
12 GpuCompositorFrameSinkDelegate* delegate, 10 GpuCompositorFrameSinkDelegate* delegate,
13 cc::SurfaceManager* surface_manager, 11 cc::SurfaceManager* surface_manager,
14 const cc::FrameSinkId& frame_sink_id, 12 const cc::FrameSinkId& frame_sink_id,
15 cc::mojom::MojoCompositorFrameSinkRequest request, 13 cc::mojom::MojoCompositorFrameSinkRequest request,
16 cc::mojom::MojoCompositorFrameSinkPrivateRequest 14 cc::mojom::MojoCompositorFrameSinkPrivateRequest
17 compositor_frame_sink_private_request, 15 compositor_frame_sink_private_request,
18 cc::mojom::MojoCompositorFrameSinkClientPtr client) 16 cc::mojom::MojoCompositorFrameSinkClientPtr client)
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 void GpuCompositorFrameSink::AddChildFrameSink( 67 void GpuCompositorFrameSink::AddChildFrameSink(
70 const cc::FrameSinkId& child_frame_sink_id) { 68 const cc::FrameSinkId& child_frame_sink_id) {
71 support_->AddChildFrameSink(child_frame_sink_id); 69 support_->AddChildFrameSink(child_frame_sink_id);
72 } 70 }
73 71
74 void GpuCompositorFrameSink::RemoveChildFrameSink( 72 void GpuCompositorFrameSink::RemoveChildFrameSink(
75 const cc::FrameSinkId& child_frame_sink_id) { 73 const cc::FrameSinkId& child_frame_sink_id) {
76 support_->RemoveChildFrameSink(child_frame_sink_id); 74 support_->RemoveChildFrameSink(child_frame_sink_id);
77 } 75 }
78 76
77 void GpuCompositorFrameSink::ClaimTemporaryReference(
78 const cc::SurfaceId& surface_id) {
79 support_->ClaimTemporaryReference(surface_id);
80 }
81
79 void GpuCompositorFrameSink::RequestCopyOfSurface( 82 void GpuCompositorFrameSink::RequestCopyOfSurface(
80 std::unique_ptr<cc::CopyOutputRequest> request) { 83 std::unique_ptr<cc::CopyOutputRequest> request) {
81 support_->RequestCopyOfSurface(std::move(request)); 84 support_->RequestCopyOfSurface(std::move(request));
82 } 85 }
83 86
84 void GpuCompositorFrameSink::OnBeginFrame(const cc::BeginFrameArgs& args) { 87 void GpuCompositorFrameSink::OnBeginFrame(const cc::BeginFrameArgs& args) {
85 if (client_) 88 if (client_)
86 client_->OnBeginFrame(args); 89 client_->OnBeginFrame(args);
87 } 90 }
88 91
(...skipping 18 matching lines...) Expand all
107 } 110 }
108 111
109 void GpuCompositorFrameSink::OnPrivateConnectionLost() { 112 void GpuCompositorFrameSink::OnPrivateConnectionLost() {
110 private_connection_lost_ = true; 113 private_connection_lost_ = true;
111 // Request destruction of |this| only if both connections are lost. 114 // Request destruction of |this| only if both connections are lost.
112 delegate_->OnPrivateConnectionLost(support_->frame_sink_id(), 115 delegate_->OnPrivateConnectionLost(support_->frame_sink_id(),
113 client_connection_lost_); 116 client_connection_lost_);
114 } 117 }
115 118
116 } // namespace display_compositor 119 } // namespace display_compositor
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698