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

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

Issue 735723005: cc: Adding creation location to debug BeginFrameArgs objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Testing on try bots. 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
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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 TRACE_EVENT_ASYNC_BEGIN0("ui", "Compositor::Draw", last_started_frame_ + 1); 232 TRACE_EVENT_ASYNC_BEGIN0("ui", "Compositor::Draw", last_started_frame_ + 1);
233 233
234 DCHECK_NE(swap_state_, SWAP_POSTED); 234 DCHECK_NE(swap_state_, SWAP_POSTED);
235 swap_state_ = SWAP_NONE; 235 swap_state_ = SWAP_NONE;
236 236
237 waiting_on_compositing_end_ = true; 237 waiting_on_compositing_end_ = true;
238 last_started_frame_++; 238 last_started_frame_++;
239 if (!IsLocked()) { 239 if (!IsLocked()) {
240 // TODO(nduca): Temporary while compositor calls 240 // TODO(nduca): Temporary while compositor calls
241 // compositeImmediately() directly. 241 // compositeImmediately() directly.
242 cc::BeginFrameArgs args = 242 cc::BeginFrameArgs args = cc::BeginFrameArgs::Create(
243 cc::BeginFrameArgs::Create(gfx::FrameTime::Now(), 243 BEGINFRAME_FROM_HERE, gfx::FrameTime::Now(), base::TimeTicks(),
244 base::TimeTicks(), 244 cc::BeginFrameArgs::DefaultInterval(), cc::BeginFrameArgs::SYNCHRONOUS);
245 cc::BeginFrameArgs::DefaultInterval());
246 BeginMainFrame(args); 245 BeginMainFrame(args);
247 host_->Composite(args.frame_time); 246 host_->Composite(args.frame_time);
248 } 247 }
249 if (swap_state_ == SWAP_NONE) 248 if (swap_state_ == SWAP_NONE)
250 NotifyEnd(); 249 NotifyEnd();
251 } 250 }
252 251
253 void Compositor::ScheduleFullRedraw() { 252 void Compositor::ScheduleFullRedraw() {
254 host_->SetNeedsRedraw(); 253 host_->SetNeedsRedraw();
255 } 254 }
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 // Call ScheduleDraw() instead of Draw() in order to allow other 457 // Call ScheduleDraw() instead of Draw() in order to allow other
459 // CompositorObservers to be notified before starting another 458 // CompositorObservers to be notified before starting another
460 // draw cycle. 459 // draw cycle.
461 ScheduleDraw(); 460 ScheduleDraw();
462 } 461 }
463 FOR_EACH_OBSERVER( 462 FOR_EACH_OBSERVER(
464 CompositorObserver, observer_list_, OnCompositingEnded(this)); 463 CompositorObserver, observer_list_, OnCompositingEnded(this));
465 } 464 }
466 465
467 } // namespace ui 466 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698