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

Unified Diff: cc/layers/picture_layer_impl.cc

Issue 2899403003: cc: Give non-drawing layers that are rasterized a lower priority. (Closed)
Patch Set: type Created 3 years, 7 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 | « cc/layers/layer_impl.cc ('k') | cc/layers/picture_layer_impl_perftest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_layer_impl.cc
diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
index f43c977f6846f5e1cacb58731f69821164c62a34..f7d061fb701745dd1aa39546375fb59a66ed33bd 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -515,9 +515,13 @@ bool PictureLayerImpl::UpdateTiles() {
// The reason for this is that we should be able to activate sooner and get a
// more up to date recording, so we don't run out of recording on the active
// tree.
- bool can_require_tiles_for_activation =
- !only_used_low_res_last_append_quads_ || RequiresHighResToDraw() ||
- !layer_tree_impl()->SmoothnessTakesPriority();
+ // A layer must be a drawing layer for it to require tiles for activation.
+ bool can_require_tiles_for_activation = false;
+ if (contributes_to_drawn_render_surface()) {
+ can_require_tiles_for_activation =
+ !only_used_low_res_last_append_quads_ || RequiresHighResToDraw() ||
+ !layer_tree_impl()->SmoothnessTakesPriority();
+ }
static const Occlusion kEmptyOcclusion;
const Occlusion& occlusion_in_content_space =
@@ -1458,8 +1462,8 @@ bool PictureLayerImpl::IsOnActiveOrPendingTree() const {
}
bool PictureLayerImpl::HasValidTilePriorities() const {
- return IsOnActiveOrPendingTree() && (contributes_to_drawn_render_surface() ||
- raster_even_if_not_in_rsll());
+ return IsOnActiveOrPendingTree() &&
+ (contributes_to_drawn_render_surface() || raster_even_if_not_drawn());
}
void PictureLayerImpl::InvalidateRegionForImages(
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | cc/layers/picture_layer_impl_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698