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

Unified Diff: cc/trees/thread_proxy.cc

Issue 22926024: cc: Control activation from the Scheduler (Closed) Base URL: http://git.chromium.org/chromium/src.git@schedOutputSurface4
Patch Set: git cl format Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/thread_proxy.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/thread_proxy.cc
diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc
index 955ce252eb1101dae960a4d23260bcdbbc305200..25ae6eb7605cd6adea1128738f87f46723267be1 100644
--- a/cc/trees/thread_proxy.cc
+++ b/cc/trees/thread_proxy.cc
@@ -410,11 +410,9 @@ void ThreadProxy::OnCanDrawStateChanged(bool can_draw) {
!scheduler_on_impl_thread_->WillDrawIfNeeded());
}
-void ThreadProxy::OnHasPendingTreeStateChanged(bool has_pending_tree) {
- DCHECK(IsImplThread());
- TRACE_EVENT1("cc", "ThreadProxy::OnHasPendingTreeStateChanged",
- "has_pending_tree", has_pending_tree);
- scheduler_on_impl_thread_->SetHasPendingTree(has_pending_tree);
+void ThreadProxy::NotifyReadyToActivate() {
+ TRACE_EVENT0("cc", "ThreadProxy::NotifyReadyToActivate");
+ scheduler_on_impl_thread_->NotifyReadyToActivate();
}
void ThreadProxy::SetNeedsCommitOnImplThread() {
@@ -966,10 +964,10 @@ void ThreadProxy::ScheduledActionUpdateVisibleTiles() {
layer_tree_host_impl_->UpdateVisibleTiles();
}
-void ThreadProxy::ScheduledActionActivatePendingTreeIfNeeded() {
+void ThreadProxy::ScheduledActionActivatePendingTree() {
DCHECK(IsImplThread());
- TRACE_EVENT0("cc", "ThreadProxy::ScheduledActionActivatePendingTreeIfNeeded");
- layer_tree_host_impl_->ActivatePendingTreeIfNeeded();
+ TRACE_EVENT0("cc", "ThreadProxy::ScheduledActionActivatePendingTree");
+ layer_tree_host_impl_->ActivatePendingTree();
}
void ThreadProxy::ScheduledActionBeginOutputSurfaceCreation() {
@@ -1003,11 +1001,8 @@ ThreadProxy::ScheduledActionDrawAndSwapInternal(bool forced_draw) {
base::Time wall_clock_time = layer_tree_host_impl_->CurrentFrameTime();
// TODO(enne): This should probably happen post-animate.
- if (layer_tree_host_impl_->pending_tree()) {
- layer_tree_host_impl_->ActivatePendingTreeIfNeeded();
- if (layer_tree_host_impl_->pending_tree())
- layer_tree_host_impl_->pending_tree()->UpdateDrawProperties();
- }
+ if (layer_tree_host_impl_->pending_tree())
+ layer_tree_host_impl_->pending_tree()->UpdateDrawProperties();
layer_tree_host_impl_->Animate(monotonic_time, wall_clock_time);
layer_tree_host_impl_->UpdateBackgroundAnimateTicking(false);
« no previous file with comments | « cc/trees/thread_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698