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

Unified Diff: cc/resources/picture_layer_tiling.cc

Issue 672283003: cc: ReadyToDraw notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/resources/picture_layer_tiling.cc
diff --git a/cc/resources/picture_layer_tiling.cc b/cc/resources/picture_layer_tiling.cc
index f47c700febaf7ee6ff8696be57dd9f2ad9a27672..3a9a1eaeeb3bda0bb7a0a77f3f3ec525ba167488 100644
--- a/cc/resources/picture_layer_tiling.cc
+++ b/cc/resources/picture_layer_tiling.cc
@@ -734,6 +734,25 @@ bool PictureLayerTiling::IsTileRequiredForActivation(const Tile* tile) const {
return true;
}
+bool PictureLayerTiling::IsTileRequiredForDraw(const Tile* tile) const {
+ DCHECK_EQ(ACTIVE_TREE, client_->GetTree());
+
+ // Note that although this function will determine whether tile is required
vmpstr 2014/10/24 18:02:24 Same here.
ernstm 2014/10/27 21:13:56 Done.
+ // for draw assuming that it is in visible (ie in the viewport). That is
+ // to say, even if the tile is outside of the viewport, it will be treated as
+ // if it was inside (there are no explicit checks for this). Hence, this
+ // function is only called for visible tiles to ensure we don't block
+ // activation on tiles outside of the viewport.
vmpstr 2014/10/24 18:02:24 This is not correct, this should say something sim
enne (OOO) 2014/10/24 19:16:28 "activation", eh? I know that this is a copy-past
ernstm 2014/10/27 21:13:56 Done.
+
+ if (resolution_ != HIGH_RESOLUTION)
+ return false;
+
+ if (IsTileOccluded(tile))
+ return false;
+
+ return true;
+}
+
void PictureLayerTiling::UpdateTileAndTwinPriority(Tile* tile) const {
UpdateTilePriority(tile);
@@ -745,6 +764,8 @@ void PictureLayerTiling::UpdateTileAndTwinPriority(Tile* tile) const {
tile->set_is_occluded(twin_tree, false);
if (twin_tree == PENDING_TREE)
tile->set_required_for_activation(false);
+ else
+ tile->set_required_for_draw(false);
return;
}
@@ -765,12 +786,16 @@ void PictureLayerTiling::UpdateTilePriority(Tile* tile) const {
tile->SetPriority(tree, TilePriority(resolution_, TilePriority::NOW, 0));
if (tree == PENDING_TREE)
tile->set_required_for_activation(IsTileRequiredForActivation(tile));
+ else
+ tile->set_required_for_draw(IsTileRequiredForDraw(tile));
tile->set_is_occluded(tree, IsTileOccluded(tile));
return;
}
if (tree == PENDING_TREE)
tile->set_required_for_activation(false);
+ else
+ tile->set_required_for_draw(false);
tile->set_is_occluded(tree, false);
DCHECK_GT(content_to_screen_scale_, 0.f);

Powered by Google App Engine
This is Rietveld 408576698