Index: cc/layer_tree_host_impl.cc |
diff --git a/cc/layer_tree_host_impl.cc b/cc/layer_tree_host_impl.cc |
index e6b9ac99e0d49ae673f001b56a4ce6ad514d74aa..85fa620bfea3bce3215975e30e213a39a03649b5 100644 |
--- a/cc/layer_tree_host_impl.cc |
+++ b/cc/layer_tree_host_impl.cc |
@@ -464,9 +464,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(); |
@@ -714,6 +711,12 @@ void LayerTreeHostImpl::ScheduleManageTiles() |
m_client->setNeedsManageTilesOnImplThread(); |
} |
+void LayerTreeHostImpl::DidUploadVisibleHighResolutionTile() |
+{ |
+ if (m_client) |
+ m_client->setNeedsRedrawOnImplThread(); |
nduca
2013/01/16 04:09:47
see now i dont get why this one does setNeedsRedra
brianderson
2013/01/16 20:12:22
In this case, we know we have a better frame to dr
|
+} |
+ |
bool LayerTreeHostImpl::shouldClearRootRenderPass() const |
{ |
return m_settings.shouldClearRootRenderPass; |
@@ -837,7 +840,13 @@ bool LayerTreeHostImpl::swapBuffers() |
DCHECK(m_renderer); |
m_fpsCounter->markEndOfFrame(); |
- return m_renderer->swapBuffers(); |
+ bool result = m_renderer->swapBuffers(); |
+ |
+ if (!activeTree()->AreVisibleResourcesReady()) { |
nduca
2013/01/16 04:09:47
I'm confused, why are we checking this again here?
brianderson
2013/01/16 20:12:22
This checks if the active tree just drawn was inco
|
+ m_client->setNeedsRedrawOnVisibleTextureUploadOnImplThread(); |
+ } |
+ |
+ return result; |
} |
const gfx::Size& LayerTreeHostImpl::deviceViewportSize() const |
@@ -906,6 +915,8 @@ void LayerTreeHostImpl::createPendingTree() |
m_client->onHasPendingTreeStateChanged(pendingTree()); |
} |
+// This function should not be called from within a draw, as it can trigger |
+// as spurious draw if a new visible tile gets upload. |
void LayerTreeHostImpl::checkForCompletedSetPixels() |
{ |
if (m_tileManager) |
@@ -917,8 +928,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() && |