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

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: Rebased after managed_tile_state refactoring. 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') | no next file with comments »
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 66f9ff36af4ddcfa1b7a9b2efe4f709a0e3b5554..be5874002f456f6f6b6015d46869f63d4e9ff447 100644
--- a/cc/picture_layer_impl.cc
+++ b/cc/picture_layer_impl.cc
@@ -507,6 +507,13 @@ bool PictureLayerImpl::AreVisibleResourcesReady() const {
float min_acceptable_scale =
std::min(raster_contents_scale, ideal_contents_scale_);
+ TreePriority tree_priority =
+ layer_tree_impl()->tile_manager()->GlobalState().tree_priority;
+ bool should_force_uploads =
+ tree_priority != SMOOTHNESS_TAKES_PRIORITY &&
+ layer_tree_impl()->animationRegistrar()->
+ active_animation_controllers().empty();
+
if (PictureLayerImpl* twin = ActiveTwin()) {
float twin_raster_contents_scale =
twin->raster_page_scale_ *
@@ -531,6 +538,8 @@ bool PictureLayerImpl::AreVisibleResourcesReady() const {
PictureLayerTiling::LayerDeviceAlignmentUnknown);
iter;
++iter) {
+ if (should_force_uploads && iter)
+ layer_tree_impl()->tile_manager()->ForceTileUploadToComplete(*iter);
// A null tile (i.e. no recording) is considered "ready".
if (!*iter || iter->drawing_info().IsReadyToDraw())
missing_region.Subtract(iter.geometry_rect());
« no previous file with comments | « no previous file | cc/resource_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698