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/thread_proxy.h" | 5 #include "cc/thread_proxy.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "cc/delay_based_time_source.h" | 10 #include "cc/delay_based_time_source.h" |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 return m_commitRequested; | 446 return m_commitRequested; |
447 } | 447 } |
448 | 448 |
449 void ThreadProxy::setNeedsRedrawOnImplThread() | 449 void ThreadProxy::setNeedsRedrawOnImplThread() |
450 { | 450 { |
451 DCHECK(isImplThread()); | 451 DCHECK(isImplThread()); |
452 TRACE_EVENT0("cc", "ThreadProxy::setNeedsRedrawOnImplThread"); | 452 TRACE_EVENT0("cc", "ThreadProxy::setNeedsRedrawOnImplThread"); |
453 m_schedulerOnImplThread->setNeedsRedraw(); | 453 m_schedulerOnImplThread->setNeedsRedraw(); |
454 } | 454 } |
455 | 455 |
456 void ThreadProxy::didSwapUseIncompleteTextureOnImplThread() | 456 void ThreadProxy::didSwapUseIncompleteTileOnImplThread() |
457 { | 457 { |
458 DCHECK(isImplThread()); | 458 DCHECK(isImplThread()); |
459 TRACE_EVENT0("cc", "ThreadProxy::didSwapUseIncompleteTextureOnImplThread"); | 459 TRACE_EVENT0("cc", "ThreadProxy::didSwapUseIncompleteTileOnImplThread"); |
460 m_schedulerOnImplThread->didSwapUseIncompleteTexture(); | 460 m_schedulerOnImplThread->didSwapUseIncompleteTile(); |
461 } | 461 } |
462 | 462 |
463 void ThreadProxy::didUploadVisibleHighResolutionTileOnImplTread() | 463 void ThreadProxy::didUploadVisibleHighResolutionTileOnImplThread() |
464 { | 464 { |
465 DCHECK(isImplThread()); | 465 DCHECK(isImplThread()); |
466 TRACE_EVENT0("cc", "ThreadProxy::didUploadVisibleHighResolutionTileOnImplTrea
d"); | 466 TRACE_EVENT0("cc", "ThreadProxy::didUploadVisibleHighResolutionTileOnImplThre
ad"); |
467 m_schedulerOnImplThread->setNeedsRedraw(); | 467 m_schedulerOnImplThread->setNeedsRedraw(); |
468 } | 468 } |
469 | 469 |
470 void ThreadProxy::mainThreadHasStoppedFlinging() | 470 void ThreadProxy::mainThreadHasStoppedFlinging() |
471 { | 471 { |
472 if (m_inputHandlerOnImplThread) | 472 if (m_inputHandlerOnImplThread) |
473 m_inputHandlerOnImplThread->mainThreadHasStoppedFlinging(); | 473 m_inputHandlerOnImplThread->mainThreadHasStoppedFlinging(); |
474 } | 474 } |
475 | 475 |
476 void ThreadProxy::start() | 476 void ThreadProxy::start() |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
748 else | 748 else |
749 { | 749 { |
750 m_commitCompletionEventOnImplThread->signal(); | 750 m_commitCompletionEventOnImplThread->signal(); |
751 m_commitCompletionEventOnImplThread = 0; | 751 m_commitCompletionEventOnImplThread = 0; |
752 } | 752 } |
753 | 753 |
754 // SetVisible kicks off the next scheduler action, so this must be last. | 754 // SetVisible kicks off the next scheduler action, so this must be last. |
755 m_schedulerOnImplThread->setVisible(m_layerTreeHostImpl->visible()); | 755 m_schedulerOnImplThread->setVisible(m_layerTreeHostImpl->visible()); |
756 } | 756 } |
757 | 757 |
758 void ThreadProxy::scheduledActionCheckForCompletedTextures() | 758 void ThreadProxy::scheduledActionCheckForCompletedTileUploads() |
759 { | 759 { |
760 DCHECK(isImplThread()); | 760 DCHECK(isImplThread()); |
761 TRACE_EVENT0("cc", "ThreadProxy::scheduledActionCheckForCompletedTextures"); | 761 TRACE_EVENT0("cc", "ThreadProxy::scheduledActionCheckForCompletedTileUploads
"); |
762 m_layerTreeHostImpl->checkForCompletedTextures(); | 762 m_layerTreeHostImpl->checkForCompletedTileUploads(); |
763 } | 763 } |
764 | 764 |
765 void ThreadProxy::scheduledActionActivatePendingTreeIfNeeded() | 765 void ThreadProxy::scheduledActionActivatePendingTreeIfNeeded() |
766 { | 766 { |
767 DCHECK(isImplThread()); | 767 DCHECK(isImplThread()); |
768 TRACE_EVENT0("cc", "ThreadProxy::scheduledActionActivatePendingTreeIfNeeded"
); | 768 TRACE_EVENT0("cc", "ThreadProxy::scheduledActionActivatePendingTreeIfNeeded"
); |
769 m_layerTreeHostImpl->activatePendingTreeIfNeeded(); | 769 m_layerTreeHostImpl->activatePendingTreeIfNeeded(); |
770 } | 770 } |
771 | 771 |
772 void ThreadProxy::scheduledActionBeginContextRecreation() | 772 void ThreadProxy::scheduledActionBeginContextRecreation() |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1152 | 1152 |
1153 void ThreadProxy::renewTreePriorityOnImplThread() | 1153 void ThreadProxy::renewTreePriorityOnImplThread() |
1154 { | 1154 { |
1155 DCHECK(m_renewTreePriorityOnImplThreadPending); | 1155 DCHECK(m_renewTreePriorityOnImplThreadPending); |
1156 m_renewTreePriorityOnImplThreadPending = false; | 1156 m_renewTreePriorityOnImplThreadPending = false; |
1157 | 1157 |
1158 renewTreePriority(); | 1158 renewTreePriority(); |
1159 } | 1159 } |
1160 | 1160 |
1161 } // namespace cc | 1161 } // namespace cc |
OLD | NEW |