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

Side by Side Diff: cc/surfaces/compositor_frame_sink_support.cc

Issue 2701663003: CompositorFrameSinkSupportClient::WillDraw needs to take in arguments (Closed)
Patch Set: c Created 3 years, 10 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "cc/surfaces/compositor_frame_sink_support.h" 5 #include "cc/surfaces/compositor_frame_sink_support.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 added_frame_observer_ = false; 209 added_frame_observer_ = false;
210 } 210 }
211 begin_frame_source_ = begin_frame_source; 211 begin_frame_source_ = begin_frame_source;
212 UpdateNeedsBeginFramesInternal(); 212 UpdateNeedsBeginFramesInternal();
213 } 213 }
214 214
215 void CompositorFrameSinkSupport::WillDrawSurface( 215 void CompositorFrameSinkSupport::WillDrawSurface(
216 const LocalSurfaceId& local_surface_id, 216 const LocalSurfaceId& local_surface_id,
217 const gfx::Rect& damage_rect) { 217 const gfx::Rect& damage_rect) {
218 if (client_) 218 if (client_)
219 client_->WillDrawSurface(); 219 client_->WillDrawSurface(local_surface_id, damage_rect);
220 } 220 }
221 221
222 void CompositorFrameSinkSupport::OnBeginFrame(const BeginFrameArgs& args) { 222 void CompositorFrameSinkSupport::OnBeginFrame(const BeginFrameArgs& args) {
223 UpdateNeedsBeginFramesInternal(); 223 UpdateNeedsBeginFramesInternal();
224 last_begin_frame_args_ = args; 224 last_begin_frame_args_ = args;
225 if (client_) 225 if (client_)
226 client_->OnBeginFrame(args); 226 client_->OnBeginFrame(args);
227 } 227 }
228 228
229 const BeginFrameArgs& CompositorFrameSinkSupport::LastUsedBeginFrameArgs() 229 const BeginFrameArgs& CompositorFrameSinkSupport::LastUsedBeginFrameArgs()
(...skipping 11 matching lines...) Expand all
241 return; 241 return;
242 242
243 added_frame_observer_ = needs_begin_frame_; 243 added_frame_observer_ = needs_begin_frame_;
244 if (needs_begin_frame_) 244 if (needs_begin_frame_)
245 begin_frame_source_->AddObserver(this); 245 begin_frame_source_->AddObserver(this);
246 else 246 else
247 begin_frame_source_->RemoveObserver(this); 247 begin_frame_source_->RemoveObserver(this);
248 } 248 }
249 249
250 } // namespace cc 250 } // namespace cc
OLDNEW
« no previous file with comments | « cc/ipc/mojo_compositor_frame_sink.mojom ('k') | cc/surfaces/compositor_frame_sink_support_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698