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

Side by Side Diff: services/ui/public/cpp/client_compositor_frame_sink.cc

Issue 2801313002: Remove MojoCompositorFrameSink::WillDrawSurface (Closed)
Patch Set: Address Nit Created 3 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/public/cpp/client_compositor_frame_sink.h" 5 #include "services/ui/public/cpp/client_compositor_frame_sink.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "cc/base/switches.h" 10 #include "cc/base/switches.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 127
128 void ClientCompositorFrameSink::ReclaimResources( 128 void ClientCompositorFrameSink::ReclaimResources(
129 const cc::ReturnedResourceArray& resources) { 129 const cc::ReturnedResourceArray& resources) {
130 DCHECK(thread_checker_); 130 DCHECK(thread_checker_);
131 DCHECK(thread_checker_->CalledOnValidThread()); 131 DCHECK(thread_checker_->CalledOnValidThread());
132 if (!client_) 132 if (!client_)
133 return; 133 return;
134 client_->ReclaimResources(resources); 134 client_->ReclaimResources(resources);
135 } 135 }
136 136
137 void ClientCompositorFrameSink::WillDrawSurface(
138 const cc::LocalSurfaceId& local_surface_id,
139 const gfx::Rect& damage_rect) {
140 // TODO(fsamuel, staraz): Implement this.
141 }
142
143 void ClientCompositorFrameSink::OnNeedsBeginFrames(bool needs_begin_frames) { 137 void ClientCompositorFrameSink::OnNeedsBeginFrames(bool needs_begin_frames) {
144 compositor_frame_sink_->SetNeedsBeginFrame(needs_begin_frames); 138 compositor_frame_sink_->SetNeedsBeginFrame(needs_begin_frames);
145 } 139 }
146 140
147 void ClientCompositorFrameSink::OnDidFinishFrame(const cc::BeginFrameAck& ack) { 141 void ClientCompositorFrameSink::OnDidFinishFrame(const cc::BeginFrameAck& ack) {
148 // If there was damage, the submitted CompositorFrame includes the ack. 142 // If there was damage, the submitted CompositorFrame includes the ack.
149 if (!ack.has_damage) 143 if (!ack.has_damage)
150 compositor_frame_sink_->BeginFrameDidNotSwap(ack); 144 compositor_frame_sink_->BeginFrameDidNotSwap(ack);
151 } 145 }
152 146
(...skipping 10 matching lines...) Expand all
163 ClientCompositorFrameSinkBinding::TakeFrameSinkRequest() { 157 ClientCompositorFrameSinkBinding::TakeFrameSinkRequest() {
164 return std::move(compositor_frame_sink_request_); 158 return std::move(compositor_frame_sink_request_);
165 } 159 }
166 160
167 cc::mojom::MojoCompositorFrameSinkClientPtrInfo 161 cc::mojom::MojoCompositorFrameSinkClientPtrInfo
168 ClientCompositorFrameSinkBinding::TakeFrameSinkClient() { 162 ClientCompositorFrameSinkBinding::TakeFrameSinkClient() {
169 return std::move(compositor_frame_sink_client_); 163 return std::move(compositor_frame_sink_client_);
170 } 164 }
171 165
172 } // namespace ui 166 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/public/cpp/client_compositor_frame_sink.h ('k') | services/ui/ws/display_client_compositor_frame_sink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698