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

Unified Diff: cc/resources/tile_priority.h

Issue 12912008: Check if priority actually changed in Tile::SetPriority() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 9 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
« cc/resources/tile.cc ('K') | « cc/resources/tile.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/tile_priority.h
diff --git a/cc/resources/tile_priority.h b/cc/resources/tile_priority.h
index c998624704d2abe9ca65bdee276e082cf1e438dc..f0425c711b8c39a677c3416cd70fe2857ca2854f 100644
--- a/cc/resources/tile_priority.h
+++ b/cc/resources/tile_priority.h
@@ -122,6 +122,19 @@ struct CC_EXPORT TilePriority {
float time_delta,
const gfx::RectF& target_bounds);
+ bool operator ==(const TilePriority& other) const {
+ if (is_live != other.is_live) return false;
+ if (!is_live) return true; // All non-live priorities are the same.
+ return resolution == other.resolution &&
+ time_to_visible_in_seconds == other.time_to_visible_in_seconds &&
+ distance_to_visible_in_pixels == other.distance_to_visible_in_pixels &&
+ current_screen_quad == other.current_screen_quad;
enne (OOO) 2013/03/20 17:05:57 The current screen quad is debug information. You
Xianzhu 2013/03/20 17:24:45 Done.
+ }
+
+ bool operator !=(const TilePriority& other) const {
+ return !(*this == other);
+ }
+
// If a tile is not live, then all other fields are invalid.
bool is_live;
TileResolution resolution;
« cc/resources/tile.cc ('K') | « cc/resources/tile.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698