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/thread_proxy.h" | 5 #include "cc/trees/thread_proxy.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
860 return; | 860 return; |
861 } | 861 } |
862 | 862 |
863 // Notify the impl thread that the main thread is ready to commit. This will | 863 // Notify the impl thread that the main thread is ready to commit. This will |
864 // begin the commit process, which is blocking from the main thread's | 864 // begin the commit process, which is blocking from the main thread's |
865 // point of view, but asynchronously performed on the impl thread, | 865 // point of view, but asynchronously performed on the impl thread, |
866 // coordinated by the Scheduler. | 866 // coordinated by the Scheduler. |
867 { | 867 { |
868 TRACE_EVENT0("cc", "ThreadProxy::BeginMainFrame::commit"); | 868 TRACE_EVENT0("cc", "ThreadProxy::BeginMainFrame::commit"); |
869 | 869 |
| 870 layer_tree_host()->trace_commit(); |
| 871 |
870 DebugScopedSetMainThreadBlocked main_thread_blocked(this); | 872 DebugScopedSetMainThreadBlocked main_thread_blocked(this); |
871 | 873 |
872 // This CapturePostTasks should be destroyed before CommitComplete() is | 874 // This CapturePostTasks should be destroyed before CommitComplete() is |
873 // called since that goes out to the embedder, and we want the embedder | 875 // called since that goes out to the embedder, and we want the embedder |
874 // to receive its callbacks before that. | 876 // to receive its callbacks before that. |
875 BlockingTaskRunner::CapturePostTasks blocked( | 877 BlockingTaskRunner::CapturePostTasks blocked( |
876 blocking_main_thread_task_runner()); | 878 blocking_main_thread_task_runner()); |
877 | 879 |
878 CompletionEvent completion; | 880 CompletionEvent completion; |
879 Proxy::ImplThreadTaskRunner()->PostTask( | 881 Proxy::ImplThreadTaskRunner()->PostTask( |
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1425 | 1427 |
1426 void ThreadProxy::PostFrameTimingEvents( | 1428 void ThreadProxy::PostFrameTimingEvents( |
1427 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events, | 1429 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events, |
1428 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) { | 1430 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) { |
1429 DCHECK(IsMainThread()); | 1431 DCHECK(IsMainThread()); |
1430 layer_tree_host()->RecordFrameTimingEvents(composite_events.Pass(), | 1432 layer_tree_host()->RecordFrameTimingEvents(composite_events.Pass(), |
1431 main_frame_events.Pass()); | 1433 main_frame_events.Pass()); |
1432 } | 1434 } |
1433 | 1435 |
1434 } // namespace cc | 1436 } // namespace cc |
OLD | NEW |