summaryrefslogtreecommitdiffstats
path: root/cc/resources/tile_manager_perftest.cc
diff options
context:
space:
mode:
authorepenner@chromium.org <epenner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-24 13:51:19 +0000
committerepenner@chromium.org <epenner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-24 13:51:19 +0000
commit1bcced2a88a693aef5351ba98b8945b4d6417b14 (patch)
tree39475f99f148a9729956aa7d8593561686513cdc /cc/resources/tile_manager_perftest.cc
parent83daccedacc8669a90d0d942bcce2df1ce018263 (diff)
downloadchromium_src-1bcced2a88a693aef5351ba98b8945b4d6417b14.zip
chromium_src-1bcced2a88a693aef5351ba98b8945b4d6417b14.tar.gz
chromium_src-1bcced2a88a693aef5351ba98b8945b4d6417b14.tar.bz2
CC: Fix raster-on-demand (due to stale sort order).
Tile sort order dirty bit didn't respect tree priority changes. This patch only updates GlobalState on ManageTiles, to ensure the state is consistent with tile sorting. BUG=295331 NOTRY=true Review URL: https://chromiumcodereview.appspot.com/24269016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224994 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/resources/tile_manager_perftest.cc')
-rw-r--r--cc/resources/tile_manager_perftest.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/cc/resources/tile_manager_perftest.cc b/cc/resources/tile_manager_perftest.cc
index 99d16a1..ce70eaf 100644
--- a/cc/resources/tile_manager_perftest.cc
+++ b/cc/resources/tile_manager_perftest.cc
@@ -43,7 +43,10 @@ class TileManagerPerfTest : public testing::Test {
ResourceProvider::Create(output_surface_.get(), 0, false);
tile_manager_ = make_scoped_ptr(
new FakeTileManager(&tile_manager_client_, resource_provider_.get()));
+ picture_pile_ = FakePicturePileImpl::CreatePile();
+ }
+ GlobalStateThatImpactsTilePriority GlobalStateForTest() {
GlobalStateThatImpactsTilePriority state;
gfx::Size tile_size = settings_.default_tile_size;
state.memory_limit_in_bytes =
@@ -52,9 +55,7 @@ class TileManagerPerfTest : public testing::Test {
state.num_resources_limit = 10000;
state.memory_limit_policy = ALLOW_ANYTHING;
state.tree_priority = SMOOTHNESS_TAKES_PRIORITY;
-
- tile_manager_->SetGlobalState(state);
- picture_pile_ = FakePicturePileImpl::CreatePile();
+ return state;
}
virtual void TearDown() OVERRIDE {
@@ -151,7 +152,7 @@ class TileManagerPerfTest : public testing::Test {
}
}
- tile_manager_->ManageTiles();
+ tile_manager_->ManageTiles(GlobalStateForTest());
tile_manager_->CheckForCompletedTasks();
timer_.NextLap();
} while (!timer_.HasTimeLimitExpired());