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

Side by Side Diff: services/ui/surfaces/gpu_compositor_frame_sink.cc

Issue 2541683004: Add/remove surface references via MojoCompositorFrameSink. (Closed)
Patch Set: Cleanup. Created 4 years 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
« no previous file with comments | « services/ui/surfaces/gpu_compositor_frame_sink.h ('k') | services/ui/ws/frame_generator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "services/ui/surfaces/gpu_compositor_frame_sink.h" 5 #include "services/ui/surfaces/gpu_compositor_frame_sink.h"
6 6
7 #include "services/ui/surfaces/display_compositor.h" 7 #include "services/ui/surfaces/display_compositor.h"
8 8
9 namespace ui { 9 namespace ui {
10 10
(...skipping 29 matching lines...) Expand all
40 void GpuCompositorFrameSink::SetNeedsBeginFrame(bool needs_begin_frame) { 40 void GpuCompositorFrameSink::SetNeedsBeginFrame(bool needs_begin_frame) {
41 support_.SetNeedsBeginFrame(needs_begin_frame); 41 support_.SetNeedsBeginFrame(needs_begin_frame);
42 } 42 }
43 43
44 void GpuCompositorFrameSink::SubmitCompositorFrame( 44 void GpuCompositorFrameSink::SubmitCompositorFrame(
45 const cc::LocalFrameId& local_frame_id, 45 const cc::LocalFrameId& local_frame_id,
46 cc::CompositorFrame frame) { 46 cc::CompositorFrame frame) {
47 support_.SubmitCompositorFrame(local_frame_id, std::move(frame)); 47 support_.SubmitCompositorFrame(local_frame_id, std::move(frame));
48 } 48 }
49 49
50 void GpuCompositorFrameSink::AddSurfaceReferences(
51 const std::vector<cc::SurfaceReference>& references) {
52 display_compositor_->AddSurfaceReferences(references);
53 }
54
55 void GpuCompositorFrameSink::RemoveSurfaceReferences(
56 const std::vector<cc::SurfaceReference>& references) {
57 display_compositor_->RemoveSurfaceReferences(references);
58 }
59
50 void GpuCompositorFrameSink::DidReceiveCompositorFrameAck() { 60 void GpuCompositorFrameSink::DidReceiveCompositorFrameAck() {
51 client_->DidReceiveCompositorFrameAck(); 61 client_->DidReceiveCompositorFrameAck();
52 } 62 }
53 63
54 void GpuCompositorFrameSink::AddChildFrameSink( 64 void GpuCompositorFrameSink::AddChildFrameSink(
55 const cc::FrameSinkId& child_frame_sink_id) { 65 const cc::FrameSinkId& child_frame_sink_id) {
56 support_.AddChildFrameSink(child_frame_sink_id); 66 support_.AddChildFrameSink(child_frame_sink_id);
57 } 67 }
58 68
59 void GpuCompositorFrameSink::RemoveChildFrameSink( 69 void GpuCompositorFrameSink::RemoveChildFrameSink(
(...skipping 25 matching lines...) Expand all
85 } 95 }
86 96
87 void GpuCompositorFrameSink::OnPrivateConnectionLost() { 97 void GpuCompositorFrameSink::OnPrivateConnectionLost() {
88 private_connection_lost_ = true; 98 private_connection_lost_ = true;
89 // Request destruction of |this| only if both connections are lost. 99 // Request destruction of |this| only if both connections are lost.
90 display_compositor_->OnCompositorFrameSinkPrivateConnectionLost( 100 display_compositor_->OnCompositorFrameSinkPrivateConnectionLost(
91 support_.frame_sink_id(), client_connection_lost_); 101 support_.frame_sink_id(), client_connection_lost_);
92 } 102 }
93 103
94 } // namespace ui 104 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/surfaces/gpu_compositor_frame_sink.h ('k') | services/ui/ws/frame_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698