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

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

Issue 2715663007: Implement temporary reference assignment with DisplayCompositor. (Closed)
Patch Set: Rebase + fixes. 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 57
60 void GpuCompositorFrameSink::Satisfy(const cc::SurfaceSequence& sequence) { 58 void GpuCompositorFrameSink::Satisfy(const cc::SurfaceSequence& sequence) {
61 support_->Satisfy(sequence); 59 support_->Satisfy(sequence);
62 } 60 }
63 61
64 void GpuCompositorFrameSink::DidReceiveCompositorFrameAck() { 62 void GpuCompositorFrameSink::DidReceiveCompositorFrameAck() {
65 if (client_) 63 if (client_)
66 client_->DidReceiveCompositorFrameAck(); 64 client_->DidReceiveCompositorFrameAck();
67 } 65 }
68 66
67 void GpuCompositorFrameSink::ClaimTemporaryReference(
68 const cc::SurfaceId& surface_id) {
69 support_->ClaimTemporaryReference(surface_id);
70 }
71
69 void GpuCompositorFrameSink::RequestCopyOfSurface( 72 void GpuCompositorFrameSink::RequestCopyOfSurface(
70 std::unique_ptr<cc::CopyOutputRequest> request) { 73 std::unique_ptr<cc::CopyOutputRequest> request) {
71 support_->RequestCopyOfSurface(std::move(request)); 74 support_->RequestCopyOfSurface(std::move(request));
72 } 75 }
73 76
74 void GpuCompositorFrameSink::OnBeginFrame(const cc::BeginFrameArgs& args) { 77 void GpuCompositorFrameSink::OnBeginFrame(const cc::BeginFrameArgs& args) {
75 if (client_) 78 if (client_)
76 client_->OnBeginFrame(args); 79 client_->OnBeginFrame(args);
77 } 80 }
78 81
(...skipping 18 matching lines...) Expand all
97 } 100 }
98 101
99 void GpuCompositorFrameSink::OnPrivateConnectionLost() { 102 void GpuCompositorFrameSink::OnPrivateConnectionLost() {
100 private_connection_lost_ = true; 103 private_connection_lost_ = true;
101 // Request destruction of |this| only if both connections are lost. 104 // Request destruction of |this| only if both connections are lost.
102 delegate_->OnPrivateConnectionLost(support_->frame_sink_id(), 105 delegate_->OnPrivateConnectionLost(support_->frame_sink_id(),
103 client_connection_lost_); 106 client_connection_lost_);
104 } 107 }
105 108
106 } // namespace display_compositor 109 } // namespace display_compositor
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698