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

Unified Diff: cc/resources/picture_layer_tiling.h

Issue 12259027: cc: Simplify the logic for deciding to update tile priorities. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add early-out and unit test Created 7 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
Index: cc/resources/picture_layer_tiling.h
diff --git a/cc/resources/picture_layer_tiling.h b/cc/resources/picture_layer_tiling.h
index 622714779739c9e0188c7779ada3ecd8400a0e56..80863512e12173bf4abed9bc536b7a7e66fe3915 100644
--- a/cc/resources/picture_layer_tiling.h
+++ b/cc/resources/picture_layer_tiling.h
@@ -136,8 +136,7 @@ class CC_EXPORT PictureLayerTiling {
float current_layer_contents_scale,
const gfx::Transform& last_screen_transform,
const gfx::Transform& current_screen_transform,
- int current_source_frame_number,
- double current_frame_time,
+ double current_frame_time_in_seconds,
bool store_screen_space_quads_on_tiles,
size_t max_tiles_for_interest_area);
@@ -146,6 +145,10 @@ class CC_EXPORT PictureLayerTiling {
// also updates the pile on each tile to be the current client's pile.
void DidBecomeActive();
+ bool NeedsUpdateForFrameAtTime(double frame_time_in_seconds) {
+ return frame_time_in_seconds != last_impl_frame_time_in_seconds_;
+ }
+
scoped_ptr<base::Value> AsValue() const;
static gfx::Rect ExpandRectEquallyToAreaBoundedBy(
@@ -176,8 +179,7 @@ class CC_EXPORT PictureLayerTiling {
gfx::Rect live_tiles_rect_;
// State saved for computing velocities based upon finite differences.
- int last_source_frame_number_;
- double last_impl_frame_time_;
+ double last_impl_frame_time_in_seconds_;
friend class CoverageIterator;

Powered by Google App Engine
This is Rietveld 408576698