| OLD | NEW | 
|---|
| 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 205     UpdateBackgroundAnimateTicking(); | 205     UpdateBackgroundAnimateTicking(); | 
| 206 | 206 | 
| 207 #if DCHECK_IS_ON | 207 #if DCHECK_IS_ON | 
| 208     // In the single-threaded case, the scale and scroll deltas should never be | 208     // In the single-threaded case, the scale and scroll deltas should never be | 
| 209     // touched on the impl layer tree. | 209     // touched on the impl layer tree. | 
| 210     scoped_ptr<ScrollAndScaleSet> scroll_info = | 210     scoped_ptr<ScrollAndScaleSet> scroll_info = | 
| 211         layer_tree_host_impl_->ProcessScrollDeltas(); | 211         layer_tree_host_impl_->ProcessScrollDeltas(); | 
| 212     DCHECK(!scroll_info->scrolls.size()); | 212     DCHECK(!scroll_info->scrolls.size()); | 
| 213     DCHECK_EQ(1.f, scroll_info->page_scale_delta); | 213     DCHECK_EQ(1.f, scroll_info->page_scale_delta); | 
| 214 #endif | 214 #endif | 
| 215 |  | 
| 216     RenderingStatsInstrumentation* stats_instrumentation = |  | 
| 217         layer_tree_host_->rendering_stats_instrumentation(); |  | 
| 218     benchmark_instrumentation::IssueMainThreadRenderingStatsEvent( |  | 
| 219         stats_instrumentation->main_thread_rendering_stats()); |  | 
| 220     stats_instrumentation->AccumulateAndClearMainThreadStats(); |  | 
| 221   } | 215   } | 
| 222 | 216 | 
| 223   if (layer_tree_host_->settings().impl_side_painting) { | 217   if (layer_tree_host_->settings().impl_side_painting) { | 
| 224     // TODO(enne): just commit directly to the active tree. | 218     // TODO(enne): just commit directly to the active tree. | 
| 225     // | 219     // | 
| 226     // Synchronously activate during commit to satisfy any potential | 220     // Synchronously activate during commit to satisfy any potential | 
| 227     // SetNextCommitWaitsForActivation calls.  Unfortunately, the tree | 221     // SetNextCommitWaitsForActivation calls.  Unfortunately, the tree | 
| 228     // might not be ready to draw, so DidActivateSyncTree must set | 222     // might not be ready to draw, so DidActivateSyncTree must set | 
| 229     // the flag to force the tree to not draw until textures are ready. | 223     // the flag to force the tree to not draw until textures are ready. | 
| 230     NotifyReadyToActivate(); | 224     NotifyReadyToActivate(); | 
| (...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 790 | 784 | 
| 791 base::TimeDelta SingleThreadProxy::CommitToActivateDurationEstimate() { | 785 base::TimeDelta SingleThreadProxy::CommitToActivateDurationEstimate() { | 
| 792   return timing_history_.CommitToActivateDurationEstimate(); | 786   return timing_history_.CommitToActivateDurationEstimate(); | 
| 793 } | 787 } | 
| 794 | 788 | 
| 795 void SingleThreadProxy::DidBeginImplFrameDeadline() { | 789 void SingleThreadProxy::DidBeginImplFrameDeadline() { | 
| 796   layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); | 790   layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); | 
| 797 } | 791 } | 
| 798 | 792 | 
| 799 }  // namespace cc | 793 }  // namespace cc | 
| OLD | NEW | 
|---|