Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Side by Side Diff: cc/trees/thread_proxy.cc

Issue 1178963003: Trace main thread commit in flow events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments tweak. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« cc/trees/layer_tree_host.cc ('K') | « cc/trees/layer_tree_host.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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()->OnCommitForSwapPromises();
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
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
OLDNEW
« cc/trees/layer_tree_host.cc ('K') | « cc/trees/layer_tree_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698