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

Unified 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: fix [chromium-style] virtual methods with non-empty bodies shouldn't be declared inline 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/thread_proxy.h ('k') | cc/tile_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/thread_proxy.cc
diff --git a/cc/thread_proxy.cc b/cc/thread_proxy.cc
index ea763c5615158d93b351b7fe2839e470cd2c809d..ccb85a72d8704b1f414e88bbb5e92b4c39a15c96 100644
--- a/cc/thread_proxy.cc
+++ b/cc/thread_proxy.cc
@@ -4,6 +4,7 @@
#include "cc/thread_proxy.h"
+#include "base/auto_reset.h"
#include "base/bind.h"
#include "base/debug/trace_event.h"
#include "cc/delay_based_time_source.h"
@@ -53,6 +54,7 @@ ThreadProxy::ThreadProxy(LayerTreeHost* layerTreeHost, scoped_ptr<Thread> implTh
, m_textureAcquisitionCompletionEventOnImplThread(0)
, m_nextFrameIsNewlyCommittedFrameOnImplThread(false)
, m_renderVSyncEnabled(layerTreeHost->settings().renderVSyncEnabled)
+ , m_insideDraw(false)
, m_totalCommitCount(0)
, m_deferCommits(false)
{
@@ -405,6 +407,11 @@ void ThreadProxy::sendManagedMemoryStats()
m_layerTreeHost->contentsTextureManager()->memoryUseBytes());
}
+bool ThreadProxy::isInsideDraw()
+{
+ return m_insideDraw;
+}
+
void ThreadProxy::setNeedsRedraw()
{
DCHECK(isMainThread());
@@ -441,6 +448,20 @@ void ThreadProxy::setNeedsRedrawOnImplThread()
m_schedulerOnImplThread->setNeedsRedraw();
}
+void ThreadProxy::didSwapUseIncompleteTextureOnImplThread()
+{
+ DCHECK(isImplThread());
+ TRACE_EVENT0("cc", "ThreadProxy::didSwapUseIncompleteTextureOnImplThread");
+ m_schedulerOnImplThread->didSwapUseIncompleteTexture();
+}
+
+void ThreadProxy::didUploadVisibleHighResolutionTileOnImplTread()
+{
+ DCHECK(isImplThread());
+ TRACE_EVENT0("cc", "ThreadProxy::didUploadVisibleHighResolutionTileOnImplTread");
+ m_schedulerOnImplThread->setNeedsRedraw();
+}
+
void ThreadProxy::mainThreadHasStoppedFlinging()
{
if (m_inputHandlerOnImplThread)
@@ -739,8 +760,17 @@ void ThreadProxy::scheduledActionCommit()
m_schedulerOnImplThread->setVisible(m_layerTreeHostImpl->visible());
}
+void ThreadProxy::scheduledActionCheckForCompletedTextures()
+{
+ DCHECK(isImplThread());
+ TRACE_EVENT0("cc", "ThreadProxy::scheduledActionCheckForCompletedTextures");
+ m_layerTreeHostImpl->checkForCompletedTextures();
+}
+
void ThreadProxy::scheduledActionActivatePendingTreeIfNeeded()
{
+ DCHECK(isImplThread());
+ TRACE_EVENT0("cc", "ThreadProxy::scheduledActionActivatePendingTreeIfNeeded");
m_layerTreeHostImpl->activatePendingTreeIfNeeded();
}
@@ -753,6 +783,9 @@ void ThreadProxy::scheduledActionBeginContextRecreation()
ScheduledActionDrawAndSwapResult ThreadProxy::scheduledActionDrawAndSwapInternal(bool forcedDraw)
{
TRACE_EVENT0("cc", "ThreadProxy::scheduledActionDrawAndSwap");
+
+ base::AutoReset<bool> markInside(&m_insideDraw, true);
+
ScheduledActionDrawAndSwapResult result;
result.didDraw = false;
result.didSwap = false;
« no previous file with comments | « cc/thread_proxy.h ('k') | cc/tile_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698