Chromium Code Reviews| 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; |