| 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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 "461509 SingleThreadProxy::DoCommit2")); | 229 "461509 SingleThreadProxy::DoCommit2")); |
| 230 DebugScopedSetMainThreadBlocked main_thread_blocked(task_runner_provider_); | 230 DebugScopedSetMainThreadBlocked main_thread_blocked(task_runner_provider_); |
| 231 DebugScopedSetImplThread impl(task_runner_provider_); | 231 DebugScopedSetImplThread impl(task_runner_provider_); |
| 232 | 232 |
| 233 // This CapturePostTasks should be destroyed before CommitComplete() is | 233 // This CapturePostTasks should be destroyed before CommitComplete() is |
| 234 // called since that goes out to the embedder, and we want the embedder | 234 // called since that goes out to the embedder, and we want the embedder |
| 235 // to receive its callbacks before that. | 235 // to receive its callbacks before that. |
| 236 commit_blocking_task_runner_.reset(new BlockingTaskRunner::CapturePostTasks( | 236 commit_blocking_task_runner_.reset(new BlockingTaskRunner::CapturePostTasks( |
| 237 task_runner_provider_->blocking_main_thread_task_runner())); | 237 task_runner_provider_->blocking_main_thread_task_runner())); |
| 238 | 238 |
| 239 layer_tree_host_impl_->BeginMainFrameCompleted(); |
| 239 layer_tree_host_impl_->BeginCommit(); | 240 layer_tree_host_impl_->BeginCommit(); |
| 240 | 241 |
| 241 // TODO(robliao): Remove ScopedTracker below once https://crbug.com/461509 | 242 // TODO(robliao): Remove ScopedTracker below once https://crbug.com/461509 |
| 242 // is fixed. | 243 // is fixed. |
| 243 tracked_objects::ScopedTracker tracking_profile6( | 244 tracked_objects::ScopedTracker tracking_profile6( |
| 244 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 245 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 245 "461509 SingleThreadProxy::DoCommit6")); | 246 "461509 SingleThreadProxy::DoCommit6")); |
| 246 if (layer_tree_host_impl_->EvictedUIResourcesExist()) | 247 if (layer_tree_host_impl_->EvictedUIResourcesExist()) |
| 247 layer_tree_host_->RecreateUIResources(); | 248 layer_tree_host_->RecreateUIResources(); |
| 248 | 249 |
| (...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 882 void SingleThreadProxy::DidFinishImplFrame() { | 883 void SingleThreadProxy::DidFinishImplFrame() { |
| 883 layer_tree_host_impl_->DidFinishImplFrame(); | 884 layer_tree_host_impl_->DidFinishImplFrame(); |
| 884 #if DCHECK_IS_ON() | 885 #if DCHECK_IS_ON() |
| 885 DCHECK(inside_impl_frame_) | 886 DCHECK(inside_impl_frame_) |
| 886 << "DidFinishImplFrame called while not inside an impl frame!"; | 887 << "DidFinishImplFrame called while not inside an impl frame!"; |
| 887 inside_impl_frame_ = false; | 888 inside_impl_frame_ = false; |
| 888 #endif | 889 #endif |
| 889 } | 890 } |
| 890 | 891 |
| 891 } // namespace cc | 892 } // namespace cc |
| OLD | NEW |