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

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: 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 side-by-side diff with in-line comments
Download patch
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() &&
« no previous file with comments | « cc/layer_tree_host_impl.h ('k') | cc/layer_tree_host_impl_unittest.cc » ('j') | cc/scheduler.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698