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 |
1117 void ThreadProxy::DidAnticipatedDrawTimeChange(base::TimeTicks time) { | 1123 void ThreadProxy::DidAnticipatedDrawTimeChange(base::TimeTicks time) { |
1118 if (impl().current_resource_update_controller) | 1124 if (impl().current_resource_update_controller) |
1119 impl().current_resource_update_controller->PerformMoreUpdates(time); | 1125 impl().current_resource_update_controller->PerformMoreUpdates(time); |
1120 } | 1126 } |
1121 | 1127 |
1122 base::TimeDelta ThreadProxy::DrawDurationEstimate() { | 1128 base::TimeDelta ThreadProxy::DrawDurationEstimate() { |
1123 return impl().timing_history.DrawDurationEstimate(); | 1129 return impl().timing_history.DrawDurationEstimate(); |
1124 } | 1130 } |
1125 | 1131 |
1126 base::TimeDelta ThreadProxy::BeginMainFrameToCommitDurationEstimate() { | 1132 base::TimeDelta ThreadProxy::BeginMainFrameToCommitDurationEstimate() { |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1368 impl().scheduler->DidPrepareTiles(); | 1374 impl().scheduler->DidPrepareTiles(); |
1369 } | 1375 } |
1370 | 1376 |
1371 void ThreadProxy::DidCompletePageScaleAnimationOnImplThread() { | 1377 void ThreadProxy::DidCompletePageScaleAnimationOnImplThread() { |
1372 DCHECK(IsImplThread()); | 1378 DCHECK(IsImplThread()); |
1373 Proxy::MainThreadTaskRunner()->PostTask( | 1379 Proxy::MainThreadTaskRunner()->PostTask( |
1374 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation, | 1380 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation, |
1375 main_thread_weak_ptr_)); | 1381 main_thread_weak_ptr_)); |
1376 } | 1382 } |
1377 | 1383 |
| 1384 void ThreadProxy::OnDrawForOutputSurface() { |
| 1385 DCHECK(IsImplThread()); |
| 1386 impl().scheduler->OnDrawForOutputSurface(); |
| 1387 } |
| 1388 |
1378 } // namespace cc | 1389 } // namespace cc |
OLD | NEW |