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 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1107 bool forced_draw = false; | 1107 bool forced_draw = false; |
1108 return DrawSwapInternal(forced_draw); | 1108 return DrawSwapInternal(forced_draw); |
1109 } | 1109 } |
1110 | 1110 |
1111 DrawResult ThreadProxy::ScheduledActionDrawAndSwapForced() { | 1111 DrawResult ThreadProxy::ScheduledActionDrawAndSwapForced() { |
1112 TRACE_EVENT0("cc", "ThreadProxy::ScheduledActionDrawAndSwapForced"); | 1112 TRACE_EVENT0("cc", "ThreadProxy::ScheduledActionDrawAndSwapForced"); |
1113 bool forced_draw = true; | 1113 bool forced_draw = true; |
1114 return DrawSwapInternal(forced_draw); | 1114 return DrawSwapInternal(forced_draw); |
1115 } | 1115 } |
1116 | 1116 |
1117 void ThreadProxy::ScheduledActionInvalidateOutputSurface() { | |
1118 TRACE_EVENT0("cc", "ThreadProxy::ScheduledActionInvalidateOutputSurface"); | |
1119 DCHECK(impl().layer_tree_host_impl->output_surface()); | |
1120 impl().layer_tree_host_impl->output_surface()->Invalidate(); | |
1121 } | |
1122 | |
1123 void ThreadProxy::DidAnticipatedDrawTimeChange(base::TimeTicks time) { | 1117 void ThreadProxy::DidAnticipatedDrawTimeChange(base::TimeTicks time) { |
1124 if (impl().current_resource_update_controller) | 1118 if (impl().current_resource_update_controller) |
1125 impl().current_resource_update_controller->PerformMoreUpdates(time); | 1119 impl().current_resource_update_controller->PerformMoreUpdates(time); |
1126 } | 1120 } |
1127 | 1121 |
1128 base::TimeDelta ThreadProxy::DrawDurationEstimate() { | 1122 base::TimeDelta ThreadProxy::DrawDurationEstimate() { |
1129 return impl().timing_history.DrawDurationEstimate(); | 1123 return impl().timing_history.DrawDurationEstimate(); |
1130 } | 1124 } |
1131 | 1125 |
1132 base::TimeDelta ThreadProxy::BeginMainFrameToCommitDurationEstimate() { | 1126 base::TimeDelta ThreadProxy::BeginMainFrameToCommitDurationEstimate() { |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1374 impl().scheduler->DidPrepareTiles(); | 1368 impl().scheduler->DidPrepareTiles(); |
1375 } | 1369 } |
1376 | 1370 |
1377 void ThreadProxy::DidCompletePageScaleAnimationOnImplThread() { | 1371 void ThreadProxy::DidCompletePageScaleAnimationOnImplThread() { |
1378 DCHECK(IsImplThread()); | 1372 DCHECK(IsImplThread()); |
1379 Proxy::MainThreadTaskRunner()->PostTask( | 1373 Proxy::MainThreadTaskRunner()->PostTask( |
1380 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation, | 1374 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation, |
1381 main_thread_weak_ptr_)); | 1375 main_thread_weak_ptr_)); |
1382 } | 1376 } |
1383 | 1377 |
1384 void ThreadProxy::OnDrawForOutputSurface() { | |
1385 DCHECK(IsImplThread()); | |
1386 impl().scheduler->OnDrawForOutputSurface(); | |
1387 } | |
1388 | |
1389 } // namespace cc | 1378 } // namespace cc |
OLD | NEW |