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

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

Issue 734063004: Update from https://crrev.com/304418 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « cc/trees/single_thread_proxy.h ('k') | cc/trees/thread_proxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "cc/debug/benchmark_instrumentation.h" 9 #include "cc/debug/benchmark_instrumentation.h"
10 #include "cc/output/context_provider.h" 10 #include "cc/output/context_provider.h"
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 if (scheduler_on_impl_thread_) 376 if (scheduler_on_impl_thread_)
377 scheduler_on_impl_thread_->SetNeedsManageTiles(); 377 scheduler_on_impl_thread_->SetNeedsManageTiles();
378 } 378 }
379 379
380 void SingleThreadProxy::SetNeedsRedrawRectOnImplThread( 380 void SingleThreadProxy::SetNeedsRedrawRectOnImplThread(
381 const gfx::Rect& damage_rect) { 381 const gfx::Rect& damage_rect) {
382 layer_tree_host_impl_->SetViewportDamage(damage_rect); 382 layer_tree_host_impl_->SetViewportDamage(damage_rect);
383 SetNeedsRedrawOnImplThread(); 383 SetNeedsRedrawOnImplThread();
384 } 384 }
385 385
386 void SingleThreadProxy::DidInitializeVisibleTileOnImplThread() {
387 TRACE_EVENT0("cc", "SingleThreadProxy::DidInitializeVisibleTileOnImplThread");
388 if (scheduler_on_impl_thread_)
389 scheduler_on_impl_thread_->SetNeedsRedraw();
390 }
391
392 void SingleThreadProxy::SetNeedsCommitOnImplThread() { 386 void SingleThreadProxy::SetNeedsCommitOnImplThread() {
393 client_->ScheduleComposite(); 387 client_->ScheduleComposite();
394 if (scheduler_on_impl_thread_) 388 if (scheduler_on_impl_thread_)
395 scheduler_on_impl_thread_->SetNeedsCommit(); 389 scheduler_on_impl_thread_->SetNeedsCommit();
396 } 390 }
397 391
398 void SingleThreadProxy::PostAnimationEventsToMainThreadOnImplThread( 392 void SingleThreadProxy::PostAnimationEventsToMainThreadOnImplThread(
399 scoped_ptr<AnimationEventsVector> events) { 393 scoped_ptr<AnimationEventsVector> events) {
400 TRACE_EVENT0( 394 TRACE_EVENT0(
401 "cc", "SingleThreadProxy::PostAnimationEventsToMainThreadOnImplThread"); 395 "cc", "SingleThreadProxy::PostAnimationEventsToMainThreadOnImplThread");
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 DebugScopedSetMainThread main(this); 740 DebugScopedSetMainThread main(this);
747 DoCommit(); 741 DoCommit();
748 } 742 }
749 743
750 void SingleThreadProxy::ScheduledActionAnimate() { 744 void SingleThreadProxy::ScheduledActionAnimate() {
751 TRACE_EVENT0("cc", "ScheduledActionAnimate"); 745 TRACE_EVENT0("cc", "ScheduledActionAnimate");
752 DebugScopedSetImplThread impl(this); 746 DebugScopedSetImplThread impl(this);
753 DoAnimate(); 747 DoAnimate();
754 } 748 }
755 749
756 void SingleThreadProxy::ScheduledActionUpdateVisibleTiles() {
757 DebugScopedSetImplThread impl(this);
758 layer_tree_host_impl_->UpdateVisibleTiles();
759 }
760
761 void SingleThreadProxy::ScheduledActionActivateSyncTree() { 750 void SingleThreadProxy::ScheduledActionActivateSyncTree() {
762 DebugScopedSetImplThread impl(this); 751 DebugScopedSetImplThread impl(this);
763 layer_tree_host_impl_->ActivateSyncTree(); 752 layer_tree_host_impl_->ActivateSyncTree();
764 } 753 }
765 754
766 void SingleThreadProxy::ScheduledActionBeginOutputSurfaceCreation() { 755 void SingleThreadProxy::ScheduledActionBeginOutputSurfaceCreation() {
767 DebugScopedSetMainThread main(this); 756 DebugScopedSetMainThread main(this);
768 DCHECK(scheduler_on_impl_thread_); 757 DCHECK(scheduler_on_impl_thread_);
769 // If possible, create the output surface in a post task. Synchronously 758 // If possible, create the output surface in a post task. Synchronously
770 // creating the output surface makes tests more awkward since this differs 759 // creating the output surface makes tests more awkward since this differs
(...skipping 26 matching lines...) Expand all
797 786
798 base::TimeDelta SingleThreadProxy::CommitToActivateDurationEstimate() { 787 base::TimeDelta SingleThreadProxy::CommitToActivateDurationEstimate() {
799 return timing_history_.CommitToActivateDurationEstimate(); 788 return timing_history_.CommitToActivateDurationEstimate();
800 } 789 }
801 790
802 void SingleThreadProxy::DidBeginImplFrameDeadline() { 791 void SingleThreadProxy::DidBeginImplFrameDeadline() {
803 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); 792 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame();
804 } 793 }
805 794
806 } // namespace cc 795 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/single_thread_proxy.h ('k') | cc/trees/thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698