Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Side by Side Diff: cc/thread_proxy.cc

Issue 11879012: cc: Redraw incomplete frames when new texture uploads finish (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@decouple_draw3b
Patch Set: rename some method, only check for incomplete frames when impl-side painting Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "cc/delay_based_time_source.h" 9 #include "cc/delay_based_time_source.h"
10 #include "cc/draw_quad.h" 10 #include "cc/draw_quad.h"
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 return m_commitRequested; 433 return m_commitRequested;
434 } 434 }
435 435
436 void ThreadProxy::setNeedsRedrawOnImplThread() 436 void ThreadProxy::setNeedsRedrawOnImplThread()
437 { 437 {
438 DCHECK(isImplThread()); 438 DCHECK(isImplThread());
439 TRACE_EVENT0("cc", "ThreadProxy::setNeedsRedrawOnImplThread"); 439 TRACE_EVENT0("cc", "ThreadProxy::setNeedsRedrawOnImplThread");
440 m_schedulerOnImplThread->setNeedsRedraw(); 440 m_schedulerOnImplThread->setNeedsRedraw();
441 } 441 }
442 442
443 void ThreadProxy::didSwapUseIncompleteTextureOnImplThread()
444 {
445 DCHECK(isImplThread());
446 TRACE_EVENT0("cc", "ThreadProxy::didSwapUseIncompleteTextureOnImplThread");
447 m_schedulerOnImplThread->didSwapUseIncompleteTexture();
448 }
449
450 void ThreadProxy::didUploadVisibleHighResolutionTileOnImplTread()
451 {
452 DCHECK(isImplThread());
453 TRACE_EVENT0("cc", "ThreadProxy::didUploadVisibleHighResolutionTileOnImplTrea d");
454 m_schedulerOnImplThread->setNeedsRedraw();
455 }
456
443 void ThreadProxy::mainThreadHasStoppedFlinging() 457 void ThreadProxy::mainThreadHasStoppedFlinging()
444 { 458 {
445 if (m_inputHandlerOnImplThread) 459 if (m_inputHandlerOnImplThread)
446 m_inputHandlerOnImplThread->mainThreadHasStoppedFlinging(); 460 m_inputHandlerOnImplThread->mainThreadHasStoppedFlinging();
447 } 461 }
448 462
449 void ThreadProxy::start() 463 void ThreadProxy::start()
450 { 464 {
451 DCHECK(isMainThread()); 465 DCHECK(isMainThread());
452 DCHECK(Proxy::implThread()); 466 DCHECK(Proxy::implThread());
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 734
721 m_nextFrameIsNewlyCommittedFrameOnImplThread = true; 735 m_nextFrameIsNewlyCommittedFrameOnImplThread = true;
722 736
723 m_commitCompletionEventOnImplThread->signal(); 737 m_commitCompletionEventOnImplThread->signal();
724 m_commitCompletionEventOnImplThread = 0; 738 m_commitCompletionEventOnImplThread = 0;
725 739
726 // SetVisible kicks off the next scheduler action, so this must be last. 740 // SetVisible kicks off the next scheduler action, so this must be last.
727 m_schedulerOnImplThread->setVisible(m_layerTreeHostImpl->visible()); 741 m_schedulerOnImplThread->setVisible(m_layerTreeHostImpl->visible());
728 } 742 }
729 743
744 void ThreadProxy::scheduledActionCheckForNewTextures()
745 {
746 DCHECK(isImplThread());
747 TRACE_EVENT0("cc", "ThreadProxy::scheduledActionCheckForNewTextures");
748 m_layerTreeHostImpl->checkForCompletedSetPixels();
749 }
750
730 void ThreadProxy::scheduledActionActivatePendingTreeIfNeeded() 751 void ThreadProxy::scheduledActionActivatePendingTreeIfNeeded()
731 { 752 {
753 DCHECK(isImplThread());
754 TRACE_EVENT0("cc", "ThreadProxy::scheduledActionActivatePendingTreeIfNeeded" );
732 m_layerTreeHostImpl->activatePendingTreeIfNeeded(); 755 m_layerTreeHostImpl->activatePendingTreeIfNeeded();
733 } 756 }
734 757
735 void ThreadProxy::scheduledActionBeginContextRecreation() 758 void ThreadProxy::scheduledActionBeginContextRecreation()
736 { 759 {
737 DCHECK(isImplThread()); 760 DCHECK(isImplThread());
738 Proxy::mainThread()->postTask(base::Bind(&ThreadProxy::beginContextRecreatio n, m_mainThreadWeakPtr)); 761 Proxy::mainThread()->postTask(base::Bind(&ThreadProxy::beginContextRecreatio n, m_mainThreadWeakPtr));
739 } 762 }
740 763
741 ScheduledActionDrawAndSwapResult ThreadProxy::scheduledActionDrawAndSwapInternal (bool forcedDraw) 764 ScheduledActionDrawAndSwapResult ThreadProxy::scheduledActionDrawAndSwapInternal (bool forcedDraw)
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
1050 } 1073 }
1051 1074
1052 void ThreadProxy::capturePictureOnImplThread(CompletionEvent* completion, skia:: RefPtr<SkPicture>* picture) 1075 void ThreadProxy::capturePictureOnImplThread(CompletionEvent* completion, skia:: RefPtr<SkPicture>* picture)
1053 { 1076 {
1054 DCHECK(isImplThread()); 1077 DCHECK(isImplThread());
1055 *picture = m_layerTreeHostImpl->capturePicture(); 1078 *picture = m_layerTreeHostImpl->capturePicture();
1056 completion->signal(); 1079 completion->signal();
1057 } 1080 }
1058 1081
1059 } // namespace cc 1082 } // namespace cc
OLDNEW
« cc/scheduler.h ('K') | « cc/thread_proxy.h ('k') | cc/tile_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698