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 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
905 // sync tree has already activated if there was no work to be done. | 905 // sync tree has already activated if there was no work to be done. |
906 TRACE_EVENT_INSTANT0("cc", "HoldCommit", TRACE_EVENT_SCOPE_THREAD); | 906 TRACE_EVENT_INSTANT0("cc", "HoldCommit", TRACE_EVENT_SCOPE_THREAD); |
907 impl().completion_event_for_commit_held_on_tree_activation = | 907 impl().completion_event_for_commit_held_on_tree_activation = |
908 impl().commit_completion_event; | 908 impl().commit_completion_event; |
909 impl().commit_completion_event = NULL; | 909 impl().commit_completion_event = NULL; |
910 } else { | 910 } else { |
911 impl().commit_completion_event->Signal(); | 911 impl().commit_completion_event->Signal(); |
912 impl().commit_completion_event = NULL; | 912 impl().commit_completion_event = NULL; |
913 } | 913 } |
914 | 914 |
| 915 impl().scheduler->DidCommit(); |
| 916 |
915 // Delay this step until afer the main thread has been released as it's | 917 // Delay this step until afer the main thread has been released as it's |
916 // often a good bit of work to update the tree and prepare the new frame. | 918 // often a good bit of work to update the tree and prepare the new frame. |
917 impl().layer_tree_host_impl->CommitComplete(); | 919 impl().layer_tree_host_impl->CommitComplete(); |
918 | 920 |
919 SetInputThrottledUntilCommitOnImplThread(false); | 921 SetInputThrottledUntilCommitOnImplThread(false); |
920 | 922 |
921 impl().next_frame_is_newly_committed_frame = true; | 923 impl().next_frame_is_newly_committed_frame = true; |
922 } | 924 } |
923 | 925 |
924 void ThreadProxy::ScheduledActionActivateSyncTree() { | 926 void ThreadProxy::ScheduledActionActivateSyncTree() { |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1231 TRACE_EVENT_INSTANT0( | 1233 TRACE_EVENT_INSTANT0( |
1232 "cc", "ReleaseCommitbyActivation", TRACE_EVENT_SCOPE_THREAD); | 1234 "cc", "ReleaseCommitbyActivation", TRACE_EVENT_SCOPE_THREAD); |
1233 impl().completion_event_for_commit_held_on_tree_activation->Signal(); | 1235 impl().completion_event_for_commit_held_on_tree_activation->Signal(); |
1234 impl().completion_event_for_commit_held_on_tree_activation = NULL; | 1236 impl().completion_event_for_commit_held_on_tree_activation = NULL; |
1235 } | 1237 } |
1236 | 1238 |
1237 impl().last_processed_begin_main_frame_args = | 1239 impl().last_processed_begin_main_frame_args = |
1238 impl().last_begin_main_frame_args; | 1240 impl().last_begin_main_frame_args; |
1239 } | 1241 } |
1240 | 1242 |
| 1243 void ThreadProxy::WillPrepareTiles() { |
| 1244 DCHECK(IsImplThread()); |
| 1245 impl().scheduler->WillPrepareTiles(); |
| 1246 } |
| 1247 |
1241 void ThreadProxy::DidPrepareTiles() { | 1248 void ThreadProxy::DidPrepareTiles() { |
1242 DCHECK(IsImplThread()); | 1249 DCHECK(IsImplThread()); |
1243 impl().scheduler->DidPrepareTiles(); | 1250 impl().scheduler->DidPrepareTiles(); |
1244 } | 1251 } |
1245 | 1252 |
1246 void ThreadProxy::DidCompletePageScaleAnimationOnImplThread() { | 1253 void ThreadProxy::DidCompletePageScaleAnimationOnImplThread() { |
1247 DCHECK(IsImplThread()); | 1254 DCHECK(IsImplThread()); |
1248 Proxy::MainThreadTaskRunner()->PostTask( | 1255 Proxy::MainThreadTaskRunner()->PostTask( |
1249 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation, | 1256 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation, |
1250 main_thread_weak_ptr_)); | 1257 main_thread_weak_ptr_)); |
(...skipping 17 matching lines...) Expand all Loading... |
1268 | 1275 |
1269 void ThreadProxy::PostFrameTimingEvents( | 1276 void ThreadProxy::PostFrameTimingEvents( |
1270 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events, | 1277 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events, |
1271 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) { | 1278 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events) { |
1272 DCHECK(IsMainThread()); | 1279 DCHECK(IsMainThread()); |
1273 layer_tree_host()->RecordFrameTimingEvents(composite_events.Pass(), | 1280 layer_tree_host()->RecordFrameTimingEvents(composite_events.Pass(), |
1274 main_frame_events.Pass()); | 1281 main_frame_events.Pass()); |
1275 } | 1282 } |
1276 | 1283 |
1277 } // namespace cc | 1284 } // namespace cc |
OLD | NEW |