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

Unified Diff: cc/layer_tree_host_impl.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/layer_tree_host_impl.h ('k') | cc/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_tree_host_impl.cc
diff --git a/cc/layer_tree_host_impl.cc b/cc/layer_tree_host_impl.cc
index 797b46d6ce624c5c55a732df28e9ea864e8ae6f2..614b84e1e309bb9705f097e7c3bbc5102f9855c0 100644
--- a/cc/layer_tree_host_impl.cc
+++ b/cc/layer_tree_host_impl.cc
@@ -474,9 +474,6 @@ bool LayerTreeHostImpl::calculateRenderPasses(FrameData& frame)
// in the future.
bool drawFrame = true;
- // Make sure we have the most recent info regarding which textures have been uploaded.
- checkForCompletedSetPixels();
-
LayerIteratorType end = LayerIteratorType::end(frame.renderSurfaceLayerList);
for (LayerIteratorType it = LayerIteratorType::begin(frame.renderSurfaceLayerList); it != end; ++it) {
RenderPass::Id targetRenderPassId = it.targetRenderSurfaceLayer()->renderSurface()->renderPassId();
@@ -724,6 +721,12 @@ void LayerTreeHostImpl::ScheduleManageTiles()
m_client->setNeedsManageTilesOnImplThread();
}
+void LayerTreeHostImpl::DidUploadVisibleHighResolutionTile()
+{
+ if (m_client)
+ m_client->didUploadVisibleHighResolutionTileOnImplTread();
+}
+
bool LayerTreeHostImpl::shouldClearRootRenderPass() const
{
return m_settings.shouldClearRootRenderPass;
@@ -850,7 +853,14 @@ const RendererCapabilities& LayerTreeHostImpl::rendererCapabilities() const
bool LayerTreeHostImpl::swapBuffers()
{
DCHECK(m_renderer);
- return m_renderer->swapBuffers();
+ bool result = m_renderer->swapBuffers();
+
+ if (m_settings.implSidePainting &&
+ !activeTree()->AreVisibleResourcesReady()) {
+ m_client->didSwapUseIncompleteTextureOnImplThread();
+ }
+
+ return result;
}
const gfx::Size& LayerTreeHostImpl::deviceViewportSize() const
@@ -924,10 +934,11 @@ void LayerTreeHostImpl::createPendingTree()
m_client->onHasPendingTreeStateChanged(pendingTree());
}
-void LayerTreeHostImpl::checkForCompletedSetPixels()
+void LayerTreeHostImpl::checkForCompletedTextures()
{
+ DCHECK(!m_client->isInsideDraw()) << "Checking for completed textures within a draw may trigger spurious redraws.";
if (m_tileManager)
- m_tileManager->CheckForCompletedSetPixels();
+ m_tileManager->CheckForCompletedTextures();
}
void LayerTreeHostImpl::activatePendingTreeIfNeeded()
@@ -935,8 +946,6 @@ void LayerTreeHostImpl::activatePendingTreeIfNeeded()
if (!pendingTree())
return;
- checkForCompletedSetPixels();
-
// It's always fine to activate to an empty tree. Otherwise, only
// activate once all visible resources in pending tree are ready.
if (activeTree()->RootLayer() &&
« no previous file with comments | « cc/layer_tree_host_impl.h ('k') | cc/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698