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

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: missed one Created 3 years, 9 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
« cc/test/layer_tree_test.cc ('K') | « 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 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 void Compositor::BeginMainFrame(const cc::BeginFrameArgs& args) { 490 void Compositor::BeginMainFrame(const cc::BeginFrameArgs& args) {
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::DoShortIdleWork(const cc::BeginFrameArgs& args) {}
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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 for (auto& observer : observer_list_) 578 for (auto& observer : observer_list_)
577 observer.OnCompositingLockStateChanged(this); 579 observer.OnCompositingLockStateChanged(this);
578 } 580 }
579 581
580 void Compositor::CancelCompositorLock() { 582 void Compositor::CancelCompositorLock() {
581 if (compositor_lock_) 583 if (compositor_lock_)
582 compositor_lock_->CancelLock(); 584 compositor_lock_->CancelLock();
583 } 585 }
584 586
585 } // namespace ui 587 } // namespace ui
OLDNEW
« cc/test/layer_tree_test.cc ('K') | « ui/compositor/compositor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698