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

Unified Diff: cc/picture_layer_impl.cc

Issue 12321053: cc: Complete pending tile uploads if they are needed for tree activation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Only flush when not in smoothness/animations Created 7 years, 9 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 | « no previous file | cc/resource_provider.h » ('j') | cc/resource_provider.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/picture_layer_impl.cc
diff --git a/cc/picture_layer_impl.cc b/cc/picture_layer_impl.cc
index 0765c9d26357017d291af329da8ecf3041e7b815..2580d4197e4cec2fc2e47a179da0493684b8780a 100644
--- a/cc/picture_layer_impl.cc
+++ b/cc/picture_layer_impl.cc
@@ -498,6 +498,13 @@ bool PictureLayerImpl::areVisibleResourcesReady() const {
float min_acceptable_scale =
std::min(raster_contents_scale, ideal_contents_scale_);
+ TreePriority tree_priority =
+ layerTreeImpl()->tile_manager()->GlobalState().tree_priority;
+ bool should_flush_uploads =
+ tree_priority != SMOOTHNESS_TAKES_PRIORITY &&
+ layerTreeImpl()->animationRegistrar()->
+ active_animation_controllers().empty();
+
if (PictureLayerImpl* twin = ActiveTwin()) {
float twin_raster_contents_scale =
twin->raster_page_scale_ *
@@ -522,6 +529,8 @@ bool PictureLayerImpl::areVisibleResourcesReady() const {
PictureLayerTiling::LayerDeviceAlignmentUnknown);
iter;
++iter) {
+ if (should_flush_uploads && iter)
+ layerTreeImpl()->tile_manager()->FlushPendingTileUploadIfNeeded(*iter);
// A null tile (i.e. no recording) is considered "ready".
if (!*iter || iter->IsReadyToDraw())
missing_region.Subtract(iter.geometry_rect());
« no previous file with comments | « no previous file | cc/resource_provider.h » ('j') | cc/resource_provider.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698