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

Side by Side Diff: ui/compositor/compositor.cc

Issue 742683002: cc: Small BeginFrameArgs cleanup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Trying to upload again. Created 6 years, 1 month 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 | « content/renderer/scheduler/renderer_scheduler_impl_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/compositor/compositor.h" 5 #include "ui/compositor/compositor.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 TRACE_EVENT_ASYNC_BEGIN0("ui", "Compositor::Draw", last_started_frame_ + 1); 231 TRACE_EVENT_ASYNC_BEGIN0("ui", "Compositor::Draw", last_started_frame_ + 1);
232 232
233 DCHECK_NE(swap_state_, SWAP_POSTED); 233 DCHECK_NE(swap_state_, SWAP_POSTED);
234 swap_state_ = SWAP_NONE; 234 swap_state_ = SWAP_NONE;
235 235
236 waiting_on_compositing_end_ = true; 236 waiting_on_compositing_end_ = true;
237 last_started_frame_++; 237 last_started_frame_++;
238 if (!IsLocked()) { 238 if (!IsLocked()) {
239 // TODO(nduca): Temporary while compositor calls 239 // TODO(nduca): Temporary while compositor calls
240 // compositeImmediately() directly. 240 // compositeImmediately() directly.
241 cc::BeginFrameArgs args = 241 cc::BeginFrameArgs args = cc::BeginFrameArgs::Create(
242 cc::BeginFrameArgs::Create(gfx::FrameTime::Now(), 242 gfx::FrameTime::Now(), base::TimeTicks(),
243 base::TimeTicks(), 243 cc::BeginFrameArgs::DefaultInterval(), cc::BeginFrameArgs::SYNCHRONOUS);
244 cc::BeginFrameArgs::DefaultInterval());
245 BeginMainFrame(args); 244 BeginMainFrame(args);
246 host_->Composite(args.frame_time); 245 host_->Composite(args.frame_time);
247 } 246 }
248 if (swap_state_ == SWAP_NONE) 247 if (swap_state_ == SWAP_NONE)
249 NotifyEnd(); 248 NotifyEnd();
250 } 249 }
251 250
252 void Compositor::ScheduleFullRedraw() { 251 void Compositor::ScheduleFullRedraw() {
253 host_->SetNeedsRedraw(); 252 host_->SetNeedsRedraw();
254 } 253 }
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 // Call ScheduleDraw() instead of Draw() in order to allow other 460 // Call ScheduleDraw() instead of Draw() in order to allow other
462 // CompositorObservers to be notified before starting another 461 // CompositorObservers to be notified before starting another
463 // draw cycle. 462 // draw cycle.
464 ScheduleDraw(); 463 ScheduleDraw();
465 } 464 }
466 FOR_EACH_OBSERVER( 465 FOR_EACH_OBSERVER(
467 CompositorObserver, observer_list_, OnCompositingEnded(this)); 466 CompositorObserver, observer_list_, OnCompositingEnded(this));
468 } 467 }
469 468
470 } // namespace ui 469 } // namespace ui
OLDNEW
« no previous file with comments | « content/renderer/scheduler/renderer_scheduler_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698