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

Unified Diff: cc/trees/damage_tracker.h

Issue 2873593002: Force use of and cache render surface. (Closed)
Patch Set: Rebased to resolve conflict. Created 3 years, 5 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/quads/render_pass_unittest.cc ('k') | cc/trees/damage_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/damage_tracker.h
diff --git a/cc/trees/damage_tracker.h b/cc/trees/damage_tracker.h
index 5ad62c896001bb8c410f19fa1b69d42ddf5a7611..c320db4335030e528d6ddb371fb8623be5807d99 100644
--- a/cc/trees/damage_tracker.h
+++ b/cc/trees/damage_tracker.h
@@ -36,11 +36,18 @@ class CC_EXPORT DamageTracker {
LayerTreeImpl* layer_tree_impl,
const RenderSurfaceList& render_surface_list);
- void DidDrawDamagedArea() { current_damage_ = DamageAccumulator(); }
+ void DidDrawDamagedArea() {
+ current_damage_ = DamageAccumulator();
+ has_damage_from_contributing_content_ = false;
+ }
void AddDamageNextUpdate(const gfx::Rect& dmg) { current_damage_.Union(dmg); }
bool GetDamageRectIfValid(gfx::Rect* rect);
+ bool has_damage_from_contributing_content() const {
+ return has_damage_from_contributing_content_;
+ }
+
private:
DamageTracker();
@@ -141,6 +148,8 @@ class CC_EXPORT DamageTracker {
unsigned int mailboxId_;
DamageAccumulator current_damage_;
+ // Damage from contributing render surface and layer
+ bool has_damage_from_contributing_content_;
// Damage accumulated since the last call to PrepareForUpdate().
DamageAccumulator damage_for_this_update_;
« no previous file with comments | « cc/quads/render_pass_unittest.cc ('k') | cc/trees/damage_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698