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

Unified Diff: cc/layers/picture_layer_impl.cc

Issue 14883003: cc: Fix impl-side painting flashing due to missing tiles (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleaned up Created 7 years, 8 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/layers/picture_layer_impl.cc
diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
index 24a83cb20d429bcac34b931df3ad32368278a5cd..f2fd744bf655edbca65a2aa2cc3f4e8c41829a8e 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -524,6 +524,13 @@ void PictureLayerImpl::SyncTiling(
if (!DrawsContent() || tiling->contents_scale() < MinimumContentsScale())
return;
tilings_->Clone(tiling);
+
+ // If this tree needs update draw properties, then the tiling will
+ // get updated prior to drawing or activation. If this tree does not
+ // need update draw properties, then its transforms are up to date and
+ // we can create tiles for this tiling immediately.
+ if (!layer_tree_impl()->needs_update_draw_properties())
+ UpdateTilePriorities();
}
void PictureLayerImpl::SetIsMask(bool is_mask) {
@@ -557,6 +564,7 @@ ResourceProvider::ResourceId PictureLayerImpl::ContentsResourceId() const {
bool PictureLayerImpl::AreVisibleResourcesReady() const {
DCHECK(layer_tree_impl()->IsPendingTree());
+ DCHECK(!layer_tree_impl()->needs_update_draw_properties());
DCHECK(ideal_contents_scale_);
if (!tilings_->num_tilings())
@@ -588,6 +596,7 @@ bool PictureLayerImpl::AreVisibleResourcesReady() const {
Region missing_region = rect;
for (size_t i = 0; i < tilings_->num_tilings(); ++i) {
PictureLayerTiling* tiling = tilings_->tiling_at(i);
+ DCHECK(tiling->has_ever_been_updated());
if (tiling->contents_scale() < min_acceptable_scale)
continue;

Powered by Google App Engine
This is Rietveld 408576698