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

Unified Diff: cc/layers/picture_layer_impl.h

Issue 881083002: cc: Clean up tilings in UpdateTiles as well as in AppendQuads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nobool Created 5 years, 11 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/layers/picture_layer_impl.cc » ('j') | cc/layers/picture_layer_impl_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_layer_impl.h
diff --git a/cc/layers/picture_layer_impl.h b/cc/layers/picture_layer_impl.h
index 86f142457521e2e49fa77577bdc2291d58be0d13..378908f9424fd9774755dd070898e76e18103ea8 100644
--- a/cc/layers/picture_layer_impl.h
+++ b/cc/layers/picture_layer_impl.h
@@ -115,7 +115,7 @@ class CC_EXPORT PictureLayerImpl
virtual bool ShouldAdjustRasterScale() const;
virtual void RecalculateRasterScales();
void CleanUpTilingsOnActiveLayer(
- std::vector<PictureLayerTiling*> used_tilings);
+ const std::vector<PictureLayerTiling*>& used_tilings);
float MinimumContentsScale() const;
float MaximumContentsScale() const;
void ResetRasterScale();
@@ -172,6 +172,13 @@ class CC_EXPORT PictureLayerImpl
gfx::Rect visible_rect_for_tile_priority_;
gfx::Rect viewport_rect_for_tile_priority_in_content_space_;
+ // List of tilings that were used last time we appended quads. This can be
+ // used as an optimization not to remove tilings if they are still being
+ // drawn. Note that accessing this vector should only be done in the context
+ // of comparing pointers, since objects pointed to are not guaranteed to
+ // exist.
+ std::vector<PictureLayerTiling*> last_append_quads_tilings_;
+
DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl);
};
« no previous file with comments | « no previous file | cc/layers/picture_layer_impl.cc » ('j') | cc/layers/picture_layer_impl_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698