Chromium Code Reviews| 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 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 456 DCHECK(IsMainThread()); | 456 DCHECK(IsMainThread()); |
| 457 return main().commit_request_sent_to_impl_thread; | 457 return main().commit_request_sent_to_impl_thread; |
| 458 } | 458 } |
| 459 | 459 |
| 460 void ThreadProxy::SetNeedsRedrawOnImplThread() { | 460 void ThreadProxy::SetNeedsRedrawOnImplThread() { |
| 461 TRACE_EVENT0("cc", "ThreadProxy::SetNeedsRedrawOnImplThread"); | 461 TRACE_EVENT0("cc", "ThreadProxy::SetNeedsRedrawOnImplThread"); |
| 462 DCHECK(IsImplThread()); | 462 DCHECK(IsImplThread()); |
| 463 impl().scheduler->SetNeedsRedraw(); | 463 impl().scheduler->SetNeedsRedraw(); |
| 464 } | 464 } |
| 465 | 465 |
| 466 void ThreadProxy::OutputSurfaceDidRequestDraw() { | |
|
brianderson
2014/12/20 00:34:13
OutputSurfaceDidRequestDrawOnImplThread
sunnyps
2014/12/20 00:39:30
Acknowledged.
| |
| 467 TRACE_EVENT0("cc", "ThreadProxy::OutputSurfaceDidRequestDraw"); | |
| 468 DCHECK(IsImplThread()); | |
| 469 impl().scheduler->OutputSurfaceDidRequestDraw(); | |
| 470 } | |
| 471 | |
| 466 void ThreadProxy::SetNeedsAnimateOnImplThread() { | 472 void ThreadProxy::SetNeedsAnimateOnImplThread() { |
| 467 TRACE_EVENT0("cc", "ThreadProxy::SetNeedsAnimateOnImplThread"); | 473 TRACE_EVENT0("cc", "ThreadProxy::SetNeedsAnimateOnImplThread"); |
| 468 DCHECK(IsImplThread()); | 474 DCHECK(IsImplThread()); |
| 469 impl().scheduler->SetNeedsAnimate(); | 475 impl().scheduler->SetNeedsAnimate(); |
| 470 } | 476 } |
| 471 | 477 |
| 472 void ThreadProxy::SetNeedsPrepareTilesOnImplThread() { | 478 void ThreadProxy::SetNeedsPrepareTilesOnImplThread() { |
| 473 DCHECK(IsImplThread()); | 479 DCHECK(IsImplThread()); |
| 474 impl().scheduler->SetNeedsPrepareTiles(); | 480 impl().scheduler->SetNeedsPrepareTiles(); |
| 475 } | 481 } |
| (...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1068 bool forced_draw = false; | 1074 bool forced_draw = false; |
| 1069 return DrawSwapInternal(forced_draw); | 1075 return DrawSwapInternal(forced_draw); |
| 1070 } | 1076 } |
| 1071 | 1077 |
| 1072 DrawResult ThreadProxy::ScheduledActionDrawAndSwapForced() { | 1078 DrawResult ThreadProxy::ScheduledActionDrawAndSwapForced() { |
| 1073 TRACE_EVENT0("cc", "ThreadProxy::ScheduledActionDrawAndSwapForced"); | 1079 TRACE_EVENT0("cc", "ThreadProxy::ScheduledActionDrawAndSwapForced"); |
| 1074 bool forced_draw = true; | 1080 bool forced_draw = true; |
| 1075 return DrawSwapInternal(forced_draw); | 1081 return DrawSwapInternal(forced_draw); |
| 1076 } | 1082 } |
| 1077 | 1083 |
| 1084 void ThreadProxy::ScheduledActionInvalidateOutputSurface() { | |
| 1085 TRACE_EVENT0("cc", "ThreadProxy::ScheduledActionInvalidateOutputSurface"); | |
| 1086 DCHECK(impl().layer_tree_host_impl->output_surface()); | |
| 1087 impl().layer_tree_host_impl->output_surface()->Invalidate(); | |
| 1088 } | |
| 1089 | |
| 1078 void ThreadProxy::DidAnticipatedDrawTimeChange(base::TimeTicks time) { | 1090 void ThreadProxy::DidAnticipatedDrawTimeChange(base::TimeTicks time) { |
| 1079 if (impl().current_resource_update_controller) | 1091 if (impl().current_resource_update_controller) |
| 1080 impl().current_resource_update_controller->PerformMoreUpdates(time); | 1092 impl().current_resource_update_controller->PerformMoreUpdates(time); |
| 1081 } | 1093 } |
| 1082 | 1094 |
| 1083 base::TimeDelta ThreadProxy::DrawDurationEstimate() { | 1095 base::TimeDelta ThreadProxy::DrawDurationEstimate() { |
| 1084 return impl().timing_history.DrawDurationEstimate(); | 1096 return impl().timing_history.DrawDurationEstimate(); |
| 1085 } | 1097 } |
| 1086 | 1098 |
| 1087 base::TimeDelta ThreadProxy::BeginMainFrameToCommitDurationEstimate() { | 1099 base::TimeDelta ThreadProxy::BeginMainFrameToCommitDurationEstimate() { |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1342 | 1354 |
| 1343 impl().timing_history.DidActivateSyncTree(); | 1355 impl().timing_history.DidActivateSyncTree(); |
| 1344 } | 1356 } |
| 1345 | 1357 |
| 1346 void ThreadProxy::DidPrepareTiles() { | 1358 void ThreadProxy::DidPrepareTiles() { |
| 1347 DCHECK(IsImplThread()); | 1359 DCHECK(IsImplThread()); |
| 1348 impl().scheduler->DidPrepareTiles(); | 1360 impl().scheduler->DidPrepareTiles(); |
| 1349 } | 1361 } |
| 1350 | 1362 |
| 1351 } // namespace cc | 1363 } // namespace cc |
| OLD | NEW |