| 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/output/context_provider.h" | 9 #include "cc/output/context_provider.h" |
| 10 #include "cc/output/output_surface.h" | 10 #include "cc/output/output_surface.h" |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 // In the single-threaded case, the scale and scroll deltas should never be | 214 // In the single-threaded case, the scale and scroll deltas should never be |
| 215 // touched on the impl layer tree. | 215 // touched on the impl layer tree. |
| 216 scoped_ptr<ScrollAndScaleSet> scroll_info = | 216 scoped_ptr<ScrollAndScaleSet> scroll_info = |
| 217 layer_tree_host_impl_->ProcessScrollDeltas(); | 217 layer_tree_host_impl_->ProcessScrollDeltas(); |
| 218 DCHECK(!scroll_info->scrolls.size()); | 218 DCHECK(!scroll_info->scrolls.size()); |
| 219 DCHECK_EQ(1.f, scroll_info->page_scale_delta); | 219 DCHECK_EQ(1.f, scroll_info->page_scale_delta); |
| 220 #endif | 220 #endif |
| 221 | 221 |
| 222 base::TimeDelta duration = stats_instrumentation->EndRecording(start_time); | 222 base::TimeDelta duration = stats_instrumentation->EndRecording(start_time); |
| 223 stats_instrumentation->AddCommit(duration); | 223 stats_instrumentation->AddCommit(duration); |
| 224 stats_instrumentation->AccumulateAndClearMainThreadStats(); |
| 224 } | 225 } |
| 225 layer_tree_host_->CommitComplete(); | 226 layer_tree_host_->CommitComplete(); |
| 226 next_frame_is_newly_committed_frame_ = true; | 227 next_frame_is_newly_committed_frame_ = true; |
| 227 } | 228 } |
| 228 | 229 |
| 229 void SingleThreadProxy::SetNeedsCommit() { | 230 void SingleThreadProxy::SetNeedsCommit() { |
| 230 DCHECK(Proxy::IsMainThread()); | 231 DCHECK(Proxy::IsMainThread()); |
| 231 layer_tree_host_->ScheduleComposite(); | 232 layer_tree_host_->ScheduleComposite(); |
| 232 } | 233 } |
| 233 | 234 |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 void SingleThreadProxy::DidSwapFrame() { | 490 void SingleThreadProxy::DidSwapFrame() { |
| 490 if (next_frame_is_newly_committed_frame_) { | 491 if (next_frame_is_newly_committed_frame_) { |
| 491 next_frame_is_newly_committed_frame_ = false; | 492 next_frame_is_newly_committed_frame_ = false; |
| 492 layer_tree_host_->DidCommitAndDrawFrame(); | 493 layer_tree_host_->DidCommitAndDrawFrame(); |
| 493 } | 494 } |
| 494 } | 495 } |
| 495 | 496 |
| 496 bool SingleThreadProxy::CommitPendingForTesting() { return false; } | 497 bool SingleThreadProxy::CommitPendingForTesting() { return false; } |
| 497 | 498 |
| 498 } // namespace cc | 499 } // namespace cc |
| OLD | NEW |