Index: cc/layer_tree_host_impl.cc |
diff --git a/cc/layer_tree_host_impl.cc b/cc/layer_tree_host_impl.cc |
index cddbec75d02a5a56574fb679414dd5b457445962..4176af914250fa20de01af4e82588822ab4c453d 100644 |
--- a/cc/layer_tree_host_impl.cc |
+++ b/cc/layer_tree_host_impl.cc |
@@ -472,9 +472,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(); |
@@ -722,6 +719,12 @@ void LayerTreeHostImpl::ScheduleManageTiles() |
m_client->setNeedsManageTilesOnImplThread(); |
} |
+void LayerTreeHostImpl::DidUploadVisibleHighResolutionTile() |
+{ |
+ if (m_client) |
+ m_client->didUploadVisibleHighResolutionTileOnImplTread(); |
+} |
+ |
bool LayerTreeHostImpl::shouldClearRootRenderPass() const |
{ |
return m_settings.shouldClearRootRenderPass; |
@@ -848,7 +851,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 |
@@ -922,6 +932,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() |
{ |
nduca
2013/01/17 22:05:18
Please add a member bool inside_draw_ and then do
brianderson
2013/01/18 00:08:18
Decided to add and use LayerTreeHostImplClient::is
|
if (m_tileManager) |
@@ -933,8 +945,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() && |