| 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 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 844 blocking_main_thread_task_runner()); | 844 blocking_main_thread_task_runner()); |
| 845 | 845 |
| 846 CompletionEvent completion; | 846 CompletionEvent completion; |
| 847 Proxy::ImplThreadTaskRunner()->PostTask( | 847 Proxy::ImplThreadTaskRunner()->PostTask( |
| 848 FROM_HERE, | 848 FROM_HERE, |
| 849 base::Bind(&ThreadProxy::StartCommitOnImplThread, | 849 base::Bind(&ThreadProxy::StartCommitOnImplThread, |
| 850 impl_thread_weak_ptr_, | 850 impl_thread_weak_ptr_, |
| 851 &completion, | 851 &completion, |
| 852 queue.release())); | 852 queue.release())); |
| 853 completion.Wait(); | 853 completion.Wait(); |
| 854 | |
| 855 RenderingStatsInstrumentation* stats_instrumentation = | |
| 856 layer_tree_host()->rendering_stats_instrumentation(); | |
| 857 benchmark_instrumentation::IssueMainThreadRenderingStatsEvent( | |
| 858 stats_instrumentation->main_thread_rendering_stats()); | |
| 859 stats_instrumentation->AccumulateAndClearMainThreadStats(); | |
| 860 } | 854 } |
| 861 | 855 |
| 862 layer_tree_host()->CommitComplete(); | 856 layer_tree_host()->CommitComplete(); |
| 863 layer_tree_host()->DidBeginMainFrame(); | 857 layer_tree_host()->DidBeginMainFrame(); |
| 864 } | 858 } |
| 865 | 859 |
| 866 void ThreadProxy::StartCommitOnImplThread(CompletionEvent* completion, | 860 void ThreadProxy::StartCommitOnImplThread(CompletionEvent* completion, |
| 867 ResourceUpdateQueue* raw_queue) { | 861 ResourceUpdateQueue* raw_queue) { |
| 868 TRACE_EVENT0("cc", "ThreadProxy::StartCommitOnImplThread"); | 862 TRACE_EVENT0("cc", "ThreadProxy::StartCommitOnImplThread"); |
| 869 DCHECK(!impl().commit_completion_event); | 863 DCHECK(!impl().commit_completion_event); |
| (...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1362 | 1356 |
| 1363 impl().timing_history.DidActivateSyncTree(); | 1357 impl().timing_history.DidActivateSyncTree(); |
| 1364 } | 1358 } |
| 1365 | 1359 |
| 1366 void ThreadProxy::DidManageTiles() { | 1360 void ThreadProxy::DidManageTiles() { |
| 1367 DCHECK(IsImplThread()); | 1361 DCHECK(IsImplThread()); |
| 1368 impl().scheduler->DidManageTiles(); | 1362 impl().scheduler->DidManageTiles(); |
| 1369 } | 1363 } |
| 1370 | 1364 |
| 1371 } // namespace cc | 1365 } // namespace cc |
| OLD | NEW |