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

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

Issue 2715663007: Implement temporary reference assignment with DisplayCompositor. (Closed)
Patch Set: Rebase. 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 const cc::LocalSurfaceId& local_surface_id, 48 const cc::LocalSurfaceId& local_surface_id,
51 cc::CompositorFrame frame) { 49 cc::CompositorFrame frame) {
52 support_->SubmitCompositorFrame(local_surface_id, std::move(frame)); 50 support_->SubmitCompositorFrame(local_surface_id, std::move(frame));
53 } 51 }
54 52
55 void GpuCompositorFrameSink::DidReceiveCompositorFrameAck() { 53 void GpuCompositorFrameSink::DidReceiveCompositorFrameAck() {
56 if (client_) 54 if (client_)
57 client_->DidReceiveCompositorFrameAck(); 55 client_->DidReceiveCompositorFrameAck();
58 } 56 }
59 57
58 void GpuCompositorFrameSink::ClaimTemporaryReference(
59 const cc::SurfaceId& surface_id) {
60 support_->ClaimTemporaryReference(surface_id);
61 }
62
60 void GpuCompositorFrameSink::RequestCopyOfSurface( 63 void GpuCompositorFrameSink::RequestCopyOfSurface(
61 std::unique_ptr<cc::CopyOutputRequest> request) { 64 std::unique_ptr<cc::CopyOutputRequest> request) {
62 support_->RequestCopyOfSurface(std::move(request)); 65 support_->RequestCopyOfSurface(std::move(request));
63 } 66 }
64 67
65 void GpuCompositorFrameSink::OnBeginFrame(const cc::BeginFrameArgs& args) { 68 void GpuCompositorFrameSink::OnBeginFrame(const cc::BeginFrameArgs& args) {
66 if (client_) 69 if (client_)
67 client_->OnBeginFrame(args); 70 client_->OnBeginFrame(args);
68 } 71 }
69 72
(...skipping 18 matching lines...) Expand all
88 } 91 }
89 92
90 void GpuCompositorFrameSink::OnPrivateConnectionLost() { 93 void GpuCompositorFrameSink::OnPrivateConnectionLost() {
91 private_connection_lost_ = true; 94 private_connection_lost_ = true;
92 // Request destruction of |this| only if both connections are lost. 95 // Request destruction of |this| only if both connections are lost.
93 delegate_->OnPrivateConnectionLost(support_->frame_sink_id(), 96 delegate_->OnPrivateConnectionLost(support_->frame_sink_id(),
94 client_connection_lost_); 97 client_connection_lost_);
95 } 98 }
96 99
97 } // namespace display_compositor 100 } // namespace display_compositor
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698