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

Unified Diff: cc/layers/picture_layer_impl_perftest.cc

Issue 644313002: cc: Use reverse spiral iterator in tiling eviction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 6 years, 2 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/layers/picture_layer_impl_perftest.cc
diff --git a/cc/layers/picture_layer_impl_perftest.cc b/cc/layers/picture_layer_impl_perftest.cc
index aeea2bb7fee2f8f68623911711864c12755bb6df..5218abd450655d57658a2ba2505d14e393fac83d 100644
--- a/cc/layers/picture_layer_impl_perftest.cc
+++ b/cc/layers/picture_layer_impl_perftest.cc
@@ -122,21 +122,15 @@ class PictureLayerImplPerfTest : public testing::Test {
host_impl_.SetViewportSize(viewport_size);
host_impl_.pending_tree()->UpdateDrawProperties();
- TreePriority priorities[] = {SAME_PRIORITY_FOR_BOTH_TREES,
- SMOOTHNESS_TAKES_PRIORITY,
- NEW_CONTENT_TAKES_PRIORITY};
- int priority_count = 0;
timer_.Reset();
do {
int count = num_tiles;
- PictureLayerImpl::LayerEvictionTileIterator it(
- pending_layer_, priorities[priority_count]);
+ PictureLayerImpl::LayerEvictionTileIterator it(pending_layer_);
while (count--) {
ASSERT_TRUE(it) << "count: " << count;
ASSERT_TRUE(*it != nullptr) << "count: " << count;
++it;
}
- priority_count = (priority_count + 1) % arraysize(priorities);
timer_.NextLap();
} while (!timer_.HasTimeLimitExpired());
@@ -155,15 +149,9 @@ class PictureLayerImplPerfTest : public testing::Test {
gfx::ScrollOffset(viewport.x(), viewport.y()));
host_impl_.pending_tree()->UpdateDrawProperties();
- TreePriority priorities[] = {SAME_PRIORITY_FOR_BOTH_TREES,
- SMOOTHNESS_TAKES_PRIORITY,
- NEW_CONTENT_TAKES_PRIORITY};
- int priority_count = 0;
timer_.Reset();
do {
- PictureLayerImpl::LayerEvictionTileIterator it(
- pending_layer_, priorities[priority_count]);
- priority_count = (priority_count + 1) % arraysize(priorities);
+ PictureLayerImpl::LayerEvictionTileIterator it(pending_layer_);
timer_.NextLap();
} while (!timer_.HasTimeLimitExpired());

Powered by Google App Engine
This is Rietveld 408576698