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

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: fix Sami'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 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 DCHECK(!IsLocked()); 490 DCHECK(!IsLocked());
491 for (auto& observer : animation_observer_list_) 491 for (auto& observer : animation_observer_list_)
492 observer.OnAnimationStep(args.frame_time); 492 observer.OnAnimationStep(args.frame_time);
493 if (animation_observer_list_.might_have_observers()) 493 if (animation_observer_list_.might_have_observers())
494 host_->SetNeedsAnimate(); 494 host_->SetNeedsAnimate();
495 } 495 }
496 496
497 void Compositor::BeginMainFrameNotExpectedSoon() { 497 void Compositor::BeginMainFrameNotExpectedSoon() {
498 } 498 }
499 499
500 void Compositor::BeginMainFrameNotExpectedUntil(base::TimeTicks time) {}
501
500 static void SendDamagedRectsRecursive(ui::Layer* layer) { 502 static void SendDamagedRectsRecursive(ui::Layer* layer) {
501 layer->SendDamagedRects(); 503 layer->SendDamagedRects();
502 for (auto* child : layer->children()) 504 for (auto* child : layer->children())
503 SendDamagedRectsRecursive(child); 505 SendDamagedRectsRecursive(child);
504 } 506 }
505 507
506 void Compositor::UpdateLayerTreeHost() { 508 void Compositor::UpdateLayerTreeHost() {
507 if (!root_layer()) 509 if (!root_layer())
508 return; 510 return;
509 SendDamagedRectsRecursive(root_layer()); 511 SendDamagedRectsRecursive(root_layer());
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 void Compositor::TimeoutLocks() { 603 void Compositor::TimeoutLocks() {
602 // Make a copy, we're going to cause |active_locks_| to become 604 // Make a copy, we're going to cause |active_locks_| to become
603 // empty. 605 // empty.
604 std::vector<CompositorLock*> locks = active_locks_; 606 std::vector<CompositorLock*> locks = active_locks_;
605 for (auto* lock : locks) 607 for (auto* lock : locks)
606 lock->TimeoutLock(); 608 lock->TimeoutLock();
607 DCHECK(active_locks_.empty()); 609 DCHECK(active_locks_.empty());
608 } 610 }
609 611
610 } // namespace ui 612 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698