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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 DCHECK(task_runner_provider_->IsMainThread()); | 211 DCHECK(task_runner_provider_->IsMainThread()); |
212 | 212 |
213 // TODO(robliao): Remove ScopedTracker below once https://crbug.com/461509 is | 213 // TODO(robliao): Remove ScopedTracker below once https://crbug.com/461509 is |
214 // fixed. | 214 // fixed. |
215 tracked_objects::ScopedTracker tracking_profile1( | 215 tracked_objects::ScopedTracker tracking_profile1( |
216 FROM_HERE_WITH_EXPLICIT_FUNCTION("461509 SingleThreadProxy::DoCommit1")); | 216 FROM_HERE_WITH_EXPLICIT_FUNCTION("461509 SingleThreadProxy::DoCommit1")); |
217 layer_tree_host_->WillCommit(); | 217 layer_tree_host_->WillCommit(); |
218 devtools_instrumentation::ScopedCommitTrace commit_task( | 218 devtools_instrumentation::ScopedCommitTrace commit_task( |
219 layer_tree_host_->id()); | 219 layer_tree_host_->id()); |
220 | 220 |
221 layer_tree_host_->ReportFixedRasterScaleUseCounters( | |
222 layer_tree_host_impl_->has_fixed_raster_scale_blurry_content(), | |
223 layer_tree_host_impl_ | |
224 ->HasFixedRasterScalePotentialPerformanceRegression()); | |
225 | |
226 // Commit immediately. | 221 // Commit immediately. |
227 { | 222 { |
228 // TODO(robliao): Remove ScopedTracker below once https://crbug.com/461509 | 223 // TODO(robliao): Remove ScopedTracker below once https://crbug.com/461509 |
229 // is fixed. | 224 // is fixed. |
230 tracked_objects::ScopedTracker tracking_profile2( | 225 tracked_objects::ScopedTracker tracking_profile2( |
231 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 226 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
232 "461509 SingleThreadProxy::DoCommit2")); | 227 "461509 SingleThreadProxy::DoCommit2")); |
233 DebugScopedSetMainThreadBlocked main_thread_blocked(task_runner_provider_); | 228 DebugScopedSetMainThreadBlocked main_thread_blocked(task_runner_provider_); |
234 DebugScopedSetImplThread impl(task_runner_provider_); | 229 DebugScopedSetImplThread impl(task_runner_provider_); |
235 | 230 |
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
889 void SingleThreadProxy::DidFinishImplFrame() { | 884 void SingleThreadProxy::DidFinishImplFrame() { |
890 layer_tree_host_impl_->DidFinishImplFrame(); | 885 layer_tree_host_impl_->DidFinishImplFrame(); |
891 #if DCHECK_IS_ON() | 886 #if DCHECK_IS_ON() |
892 DCHECK(inside_impl_frame_) | 887 DCHECK(inside_impl_frame_) |
893 << "DidFinishImplFrame called while not inside an impl frame!"; | 888 << "DidFinishImplFrame called while not inside an impl frame!"; |
894 inside_impl_frame_ = false; | 889 inside_impl_frame_ = false; |
895 #endif | 890 #endif |
896 } | 891 } |
897 | 892 |
898 } // namespace cc | 893 } // namespace cc |
OLD | NEW |