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

Side by Side Diff: cc/trees/single_thread_proxy.cc

Issue 2778223005: Plumb activation time to main (Closed)
Patch Set: pass 0 for sync tree in NotifyReadyToActivate from SingleThreadProxy 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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 "cc/trees/single_thread_proxy.h" 5 #include "cc/trees/single_thread_proxy.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/profiler/scoped_tracker.h" 9 #include "base/profiler/scoped_tracker.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 TRACE_EVENT1("cc", "SingleThreadProxy::OnCanDrawStateChanged", "can_draw", 312 TRACE_EVENT1("cc", "SingleThreadProxy::OnCanDrawStateChanged", "can_draw",
313 can_draw); 313 can_draw);
314 DCHECK(task_runner_provider_->IsImplThread()); 314 DCHECK(task_runner_provider_->IsImplThread());
315 if (scheduler_on_impl_thread_) 315 if (scheduler_on_impl_thread_)
316 scheduler_on_impl_thread_->SetCanDraw(can_draw); 316 scheduler_on_impl_thread_->SetCanDraw(can_draw);
317 } 317 }
318 318
319 void SingleThreadProxy::NotifyReadyToActivate() { 319 void SingleThreadProxy::NotifyReadyToActivate() {
320 TRACE_EVENT0("cc", "SingleThreadProxy::NotifyReadyToActivate"); 320 TRACE_EVENT0("cc", "SingleThreadProxy::NotifyReadyToActivate");
321 DebugScopedSetImplThread impl(task_runner_provider_); 321 DebugScopedSetImplThread impl(task_runner_provider_);
322 if (scheduler_on_impl_thread_) 322 if (scheduler_on_impl_thread_) {
323 scheduler_on_impl_thread_->NotifyReadyToActivate(); 323 // The argument to NotifyReadyToActivate is the pending-tree for computing
324 // Activation time in ProxyImpl. However this is not applicable here.
325 scheduler_on_impl_thread_->NotifyReadyToActivate(0);
326 }
324 } 327 }
325 328
326 void SingleThreadProxy::NotifyReadyToDraw() { 329 void SingleThreadProxy::NotifyReadyToDraw() {
327 TRACE_EVENT0("cc", "SingleThreadProxy::NotifyReadyToDraw"); 330 TRACE_EVENT0("cc", "SingleThreadProxy::NotifyReadyToDraw");
328 DebugScopedSetImplThread impl(task_runner_provider_); 331 DebugScopedSetImplThread impl(task_runner_provider_);
329 if (scheduler_on_impl_thread_) 332 if (scheduler_on_impl_thread_)
330 scheduler_on_impl_thread_->NotifyReadyToDraw(); 333 scheduler_on_impl_thread_->NotifyReadyToDraw();
331 } 334 }
332 335
333 void SingleThreadProxy::SetNeedsRedrawOnImplThread() { 336 void SingleThreadProxy::SetNeedsRedrawOnImplThread() {
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 void SingleThreadProxy::DidFinishImplFrame() { 791 void SingleThreadProxy::DidFinishImplFrame() {
789 layer_tree_host_impl_->DidFinishImplFrame(); 792 layer_tree_host_impl_->DidFinishImplFrame();
790 #if DCHECK_IS_ON() 793 #if DCHECK_IS_ON()
791 DCHECK(inside_impl_frame_) 794 DCHECK(inside_impl_frame_)
792 << "DidFinishImplFrame called while not inside an impl frame!"; 795 << "DidFinishImplFrame called while not inside an impl frame!";
793 inside_impl_frame_ = false; 796 inside_impl_frame_ = false;
794 #endif 797 #endif
795 } 798 }
796 799
797 } // namespace cc 800 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698