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

Unified Diff: cc/resources/picture_layer_tiling.cc

Issue 12259027: cc: Simplify the logic for deciding to update tile priorities. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: in_seconds 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.cc
diff --git a/cc/resources/picture_layer_tiling.cc b/cc/resources/picture_layer_tiling.cc
index 736240c976a98f0e6cba2b340e01c72b9e96268b..1dedf5bbf70ec767c1999f5ce21b2c0477ae4001 100644
--- a/cc/resources/picture_layer_tiling.cc
+++ b/cc/resources/picture_layer_tiling.cc
@@ -31,7 +31,7 @@ PictureLayerTiling::PictureLayerTiling(float contents_scale)
tiling_data_(gfx::Size(), gfx::Size(), true),
resolution_(NON_IDEAL_RESOLUTION),
last_source_frame_number_(0),
- last_impl_frame_time_(0) {
+ last_impl_frame_time_(0.0) {
}
PictureLayerTiling::~PictureLayerTiling() {
@@ -349,29 +349,12 @@ void PictureLayerTiling::UpdateTilePriorities(
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,
bool store_screen_space_quads_on_tiles,
size_t max_tiles_for_interest_area) {
if (ContentRect().IsEmpty())
return;
- bool first_update_in_new_source_frame =
- current_source_frame_number != last_source_frame_number_;
-
- bool first_update_in_new_impl_frame =
- current_frame_time != last_impl_frame_time_;
-
- // In pending tree, this is always called. We update priorities:
- // - Immediately after a commit (first_update_in_new_source_frame).
- // - On animation ticks after the first frame in the tree
- // (first_update_in_new_impl_frame).
- // In active tree, this is only called during draw. We update priorities:
- // - On draw if properties were not already computed by the pending tree
- // and activated for the frame (first_update_in_new_impl_frame).
- if (!first_update_in_new_impl_frame && !first_update_in_new_source_frame)
- return;
-
double time_delta = 0;
if (last_impl_frame_time_ != 0 && last_layer_bounds == current_layer_bounds)
time_delta = current_frame_time - last_impl_frame_time_;
@@ -506,7 +489,6 @@ void PictureLayerTiling::UpdateTilePriorities(
}
}
- last_source_frame_number_ = current_source_frame_number;
last_impl_frame_time_ = current_frame_time;
}

Powered by Google App Engine
This is Rietveld 408576698