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

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: Add BeginMainFrameNotExpectedUntil to content::CompositorImpl for Android. Created 3 years, 7 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
« no previous file with comments | « ui/compositor/compositor.h ('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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <deque> 10 #include <deque>
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 DCHECK(!IsLocked()); 485 DCHECK(!IsLocked());
486 for (auto& observer : animation_observer_list_) 486 for (auto& observer : animation_observer_list_)
487 observer.OnAnimationStep(args.frame_time); 487 observer.OnAnimationStep(args.frame_time);
488 if (animation_observer_list_.might_have_observers()) 488 if (animation_observer_list_.might_have_observers())
489 host_->SetNeedsAnimate(); 489 host_->SetNeedsAnimate();
490 } 490 }
491 491
492 void Compositor::BeginMainFrameNotExpectedSoon() { 492 void Compositor::BeginMainFrameNotExpectedSoon() {
493 } 493 }
494 494
495 void Compositor::BeginMainFrameNotExpectedUntil(base::TimeTicks time) {}
496
495 static void SendDamagedRectsRecursive(ui::Layer* layer) { 497 static void SendDamagedRectsRecursive(ui::Layer* layer) {
496 layer->SendDamagedRects(); 498 layer->SendDamagedRects();
497 for (auto* child : layer->children()) 499 for (auto* child : layer->children())
498 SendDamagedRectsRecursive(child); 500 SendDamagedRectsRecursive(child);
499 } 501 }
500 502
501 void Compositor::UpdateLayerTreeHost() { 503 void Compositor::UpdateLayerTreeHost() {
502 if (!root_layer()) 504 if (!root_layer())
503 return; 505 return;
504 SendDamagedRectsRecursive(root_layer()); 506 SendDamagedRectsRecursive(root_layer());
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 void Compositor::TimeoutLocks() { 598 void Compositor::TimeoutLocks() {
597 // Make a copy, we're going to cause |active_locks_| to become 599 // Make a copy, we're going to cause |active_locks_| to become
598 // empty. 600 // empty.
599 std::vector<CompositorLock*> locks = active_locks_; 601 std::vector<CompositorLock*> locks = active_locks_;
600 for (auto* lock : locks) 602 for (auto* lock : locks)
601 lock->TimeoutLock(); 603 lock->TimeoutLock();
602 DCHECK(active_locks_.empty()); 604 DCHECK(active_locks_.empty());
603 } 605 }
604 606
605 } // namespace ui 607 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/compositor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698