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

Unified Diff: cc/tiles/picture_layer_tiling.cc

Issue 1841083004: cc: Indicate that we've updated a tiling if we invalidated it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « cc/tiles/picture_layer_tiling.h ('k') | cc/tiles/picture_layer_tiling_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tiles/picture_layer_tiling.cc
diff --git a/cc/tiles/picture_layer_tiling.cc b/cc/tiles/picture_layer_tiling.cc
index 4282204ee6198a38aa7daa892fcb3d7a4da1c0ae..6a555068c91a10971168f377af9d14a6d3fcdff8 100644
--- a/cc/tiles/picture_layer_tiling.cc
+++ b/cc/tiles/picture_layer_tiling.cc
@@ -74,7 +74,8 @@ PictureLayerTiling::PictureLayerTiling(
has_skewport_rect_tiles_(false),
has_soon_border_rect_tiles_(false),
has_eventually_rect_tiles_(false),
- all_tiles_done_(true) {
+ all_tiles_done_(true),
+ invalidated_since_last_compute_priority_rects_(false) {
DCHECK(!raster_source->IsSolidColor());
gfx::Size content_bounds =
gfx::ScaleToCeiledSize(raster_source_->GetSize(), contents_scale);
@@ -287,6 +288,7 @@ void PictureLayerTiling::SetRasterSourceAndResize(
void PictureLayerTiling::Invalidate(const Region& layer_invalidation) {
DCHECK(tree_ != ACTIVE_TREE || !client_->GetPendingOrActiveTwinTiling(this));
+ invalidated_since_last_compute_priority_rects_ = true;
RemoveTilesInRegion(layer_invalidation, true /* recreate tiles */);
}
@@ -638,11 +640,13 @@ bool PictureLayerTiling::ComputeTilePriorityRects(
set_all_tiles_done(false);
}
+ bool invalidated = invalidated_since_last_compute_priority_rects_;
+ invalidated_since_last_compute_priority_rects_ = false;
if (!NeedsUpdateForFrameAtTimeAndViewport(current_frame_time_in_seconds,
viewport_in_layer_space)) {
// This should never be zero for the purposes of has_ever_been_updated().
DCHECK_NE(current_frame_time_in_seconds, 0.0);
- return false;
+ return invalidated;
}
const float content_to_screen_scale = ideal_contents_scale / contents_scale_;
« no previous file with comments | « cc/tiles/picture_layer_tiling.h ('k') | cc/tiles/picture_layer_tiling_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698