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/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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 tracked_objects::ScopedTracker tracking_profile7( | 251 tracked_objects::ScopedTracker tracking_profile7( |
252 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 252 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
253 "461509 SingleThreadProxy::DoCommit7")); | 253 "461509 SingleThreadProxy::DoCommit7")); |
254 layer_tree_host_->FinishCommitOnImplThread(layer_tree_host_impl_.get()); | 254 layer_tree_host_->FinishCommitOnImplThread(layer_tree_host_impl_.get()); |
255 | 255 |
256 #if DCHECK_IS_ON() | 256 #if DCHECK_IS_ON() |
257 // In the single-threaded case, the scale and scroll deltas should never be | 257 // In the single-threaded case, the scale and scroll deltas should never be |
258 // touched on the impl layer tree. | 258 // touched on the impl layer tree. |
259 std::unique_ptr<ScrollAndScaleSet> scroll_info = | 259 std::unique_ptr<ScrollAndScaleSet> scroll_info = |
260 layer_tree_host_impl_->ProcessScrollDeltas(); | 260 layer_tree_host_impl_->ProcessScrollDeltas(); |
261 DCHECK(!scroll_info->scrolls.size()); | 261 DCHECK(scroll_info->scrolls.empty()); |
262 DCHECK_EQ(1.f, scroll_info->page_scale_delta); | 262 DCHECK_EQ(1.f, scroll_info->page_scale_delta); |
263 #endif | 263 #endif |
264 | 264 |
265 if (scheduler_on_impl_thread_) | 265 if (scheduler_on_impl_thread_) |
266 scheduler_on_impl_thread_->DidCommit(); | 266 scheduler_on_impl_thread_->DidCommit(); |
267 | 267 |
268 layer_tree_host_impl_->CommitComplete(); | 268 layer_tree_host_impl_->CommitComplete(); |
269 | 269 |
270 // TODO(robliao): Remove ScopedTracker below once https://crbug.com/461509 | 270 // TODO(robliao): Remove ScopedTracker below once https://crbug.com/461509 |
271 // is fixed. | 271 // is fixed. |
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
885 void SingleThreadProxy::DidFinishImplFrame() { | 885 void SingleThreadProxy::DidFinishImplFrame() { |
886 layer_tree_host_impl_->DidFinishImplFrame(); | 886 layer_tree_host_impl_->DidFinishImplFrame(); |
887 #if DCHECK_IS_ON() | 887 #if DCHECK_IS_ON() |
888 DCHECK(inside_impl_frame_) | 888 DCHECK(inside_impl_frame_) |
889 << "DidFinishImplFrame called while not inside an impl frame!"; | 889 << "DidFinishImplFrame called while not inside an impl frame!"; |
890 inside_impl_frame_ = false; | 890 inside_impl_frame_ = false; |
891 #endif | 891 #endif |
892 } | 892 } |
893 | 893 |
894 } // namespace cc | 894 } // namespace cc |
OLD | NEW |