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

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

Issue 2753843003: Create a new action triggered when a BeginMainFrame is not expected before vsync (Closed)
Patch Set: respond to Brian's comments 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 (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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <deque> 10 #include <deque>
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 DCHECK(!IsLocked()); 461 DCHECK(!IsLocked());
462 for (auto& observer : animation_observer_list_) 462 for (auto& observer : animation_observer_list_)
463 observer.OnAnimationStep(args.frame_time); 463 observer.OnAnimationStep(args.frame_time);
464 if (animation_observer_list_.might_have_observers()) 464 if (animation_observer_list_.might_have_observers())
465 host_->SetNeedsAnimate(); 465 host_->SetNeedsAnimate();
466 } 466 }
467 467
468 void Compositor::BeginMainFrameNotExpectedSoon() { 468 void Compositor::BeginMainFrameNotExpectedSoon() {
469 } 469 }
470 470
471 void Compositor::BeginMainFrameNotExpectedUntil(base::TimeTicks time) {}
472
471 static void SendDamagedRectsRecursive(ui::Layer* layer) { 473 static void SendDamagedRectsRecursive(ui::Layer* layer) {
472 layer->SendDamagedRects(); 474 layer->SendDamagedRects();
473 for (auto* child : layer->children()) 475 for (auto* child : layer->children())
474 SendDamagedRectsRecursive(child); 476 SendDamagedRectsRecursive(child);
475 } 477 }
476 478
477 void Compositor::UpdateLayerTreeHost() { 479 void Compositor::UpdateLayerTreeHost() {
478 if (!root_layer()) 480 if (!root_layer())
479 return; 481 return;
480 SendDamagedRectsRecursive(root_layer()); 482 SendDamagedRectsRecursive(root_layer());
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 void Compositor::TimeoutLocks() { 572 void Compositor::TimeoutLocks() {
571 // Make a copy, we're going to cause |active_locks_| to become 573 // Make a copy, we're going to cause |active_locks_| to become
572 // empty. 574 // empty.
573 std::vector<CompositorLock*> locks = active_locks_; 575 std::vector<CompositorLock*> locks = active_locks_;
574 for (auto* lock : locks) 576 for (auto* lock : locks)
575 lock->TimeoutLock(); 577 lock->TimeoutLock();
576 DCHECK(active_locks_.empty()); 578 DCHECK(active_locks_.empty());
577 } 579 }
578 580
579 } // namespace ui 581 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698