summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cc/layers/picture_layer_impl.cc89
-rw-r--r--cc/layers/picture_layer_impl.h9
-rw-r--r--cc/layers/picture_layer_impl_unittest.cc147
-rw-r--r--cc/resources/picture_layer_tiling.h8
-rw-r--r--cc/resources/picture_pile_base.h4
-rw-r--r--cc/resources/tile.h1
-rw-r--r--cc/test/fake_picture_layer_impl.cc57
-rw-r--r--cc/test/fake_picture_layer_impl.h5
-rw-r--r--cc/test/fake_picture_layer_tiling_client.cc2
-rw-r--r--cc/test/fake_picture_layer_tiling_client.h2
-rw-r--r--cc/test/fake_picture_pile_impl.cc13
-rw-r--r--cc/test/fake_picture_pile_impl.h5
12 files changed, 18 insertions, 324 deletions
diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
index 39c0cb9..a8fecb9 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -488,7 +488,7 @@ const Region* PictureLayerImpl::GetInvalidation() {
}
const PictureLayerTiling* PictureLayerImpl::GetTwinTiling(
- const PictureLayerTiling* tiling) const {
+ const PictureLayerTiling* tiling) {
if (!twin_layer_)
return NULL;
@@ -659,10 +659,6 @@ void PictureLayerImpl::MarkVisibleResourcesAsRequired() const {
DCHECK(ideal_contents_scale_);
DCHECK_GT(tilings_->num_tilings(), 0u);
- // The goal of this function is to find the minimum set of tiles that need to
- // be ready to draw in order to activate without flashing content from a
- // higher res on the active tree to a lower res on the pending tree.
-
gfx::Rect rect(visible_content_rect());
float min_acceptable_scale =
@@ -679,21 +675,17 @@ void PictureLayerImpl::MarkVisibleResourcesAsRequired() const {
}
}
- PictureLayerTiling* high_res = NULL;
- PictureLayerTiling* low_res = NULL;
+ // Mark tiles for activation in two passes. Ready to draw tiles in acceptable
+ // but non-ideal tilings are marked as required for activation, but any
+ // non-ready tiles are not marked as required. From there, any missing holes
+ // will need to be filled in from the high res tiling.
- // First pass: ready to draw tiles in acceptable but non-ideal tilings are
- // marked as required for activation so that their textures are not thrown
- // away; any non-ready tiles are not marked as required.
+ PictureLayerTiling* high_res = NULL;
Region missing_region = rect;
for (size_t i = 0; i < tilings_->num_tilings(); ++i) {
PictureLayerTiling* tiling = tilings_->tiling_at(i);
DCHECK(tiling->has_ever_been_updated());
- if (tiling->resolution() == LOW_RESOLUTION) {
- DCHECK(!low_res) << "There can only be one low res tiling";
- low_res = tiling;
- }
if (tiling->contents_scale() < min_acceptable_scale)
continue;
if (tiling->resolution() == HIGH_RESOLUTION) {
@@ -719,85 +711,30 @@ void PictureLayerImpl::MarkVisibleResourcesAsRequired() const {
iter->MarkRequiredForActivation();
}
}
- DCHECK(high_res) << "There must be one high res tiling";
- // If these pointers are null (because no twin, no matching tiling, or the
- // simpification just below), then high res tiles will be required to fill any
- // holes left by the first pass above. If the pointers are valid, then this
- // layer is allowed to skip any tiles that are not ready on its twin.
- const PictureLayerTiling* twin_high_res = NULL;
- const PictureLayerTiling* twin_low_res = NULL;
-
- // As a simplification, only allow activating to skip twin tiles that the
- // active layer is also missing when both this layer and its twin have 2
- // tilings (high and low). This avoids having to iterate/track coverage of
- // non-ideal tilings during the last draw call on the active layer.
- if (high_res && low_res && tilings_->num_tilings() == 2 &&
- twin_layer_ && twin_layer_->tilings_->num_tilings() == 2) {
- twin_low_res = GetTwinTiling(low_res);
- if (twin_low_res)
- twin_high_res = GetTwinTiling(high_res);
- }
- if (!twin_high_res || !twin_low_res) {
- twin_high_res = NULL;
- twin_low_res = NULL;
- }
-
- // As a second pass, mark as required any visible high res tiles not filled in
- // by acceptable non-ideal tiles from the first pass.
- if (MarkVisibleTilesAsRequired(
- high_res, twin_high_res, contents_scale_x(), rect, &missing_region)) {
- // As an optional third pass, if a high res tile was skipped because its
- // twin was also missing, then fall back to mark low res tiles as required
- // in case the active twin is substituting those for missing high res
- // content.
- MarkVisibleTilesAsRequired(
- low_res, twin_low_res, contents_scale_x(), rect, &missing_region);
- }
-}
-
-bool PictureLayerImpl::MarkVisibleTilesAsRequired(
- PictureLayerTiling* tiling,
- const PictureLayerTiling* optional_twin_tiling,
- float contents_scale,
- gfx::Rect rect,
- Region* missing_region) const {
- bool twin_had_missing_tile = false;
- for (PictureLayerTiling::CoverageIterator iter(tiling,
- contents_scale,
+ DCHECK(high_res) << "There must be one high res tiling";
+ for (PictureLayerTiling::CoverageIterator iter(high_res,
+ contents_scale_x(),
rect);
iter;
++iter) {
- Tile* tile = *iter;
// A null tile (i.e. missing recording) can just be skipped.
- if (!tile)
+ if (!*iter)
continue;
// This iteration is over the visible content rect which is potentially
// less conservative than projecting the viewport into the layer.
// Ignore tiles that are know to be outside the viewport.
- if (tile->priority(PENDING_TREE).distance_to_visible_in_pixels != 0)
+ if (iter->priority(PENDING_TREE).distance_to_visible_in_pixels != 0)
continue;
// If the missing region doesn't cover it, this tile is fully
// covered by acceptable tiles at other scales.
- if (!missing_region->Intersects(iter.geometry_rect()))
+ if (!missing_region.Intersects(iter.geometry_rect()))
continue;
- // If the twin tile isn't ready to draw, then this tile isn't
- // required to prevent flashing.
- if (optional_twin_tiling) {
- Tile* twin_tile = optional_twin_tiling->TileAt(iter.i(), iter.j());
- if (!twin_tile || !twin_tile->IsReadyToDraw()) {
- twin_had_missing_tile = true;
- continue;
- }
- }
-
- missing_region->Subtract(iter.geometry_rect());
- tile->MarkRequiredForActivation();
+ iter->MarkRequiredForActivation();
}
- return twin_had_missing_tile;
}
void PictureLayerImpl::DoPostCommitInitialization() {
diff --git a/cc/layers/picture_layer_impl.h b/cc/layers/picture_layer_impl.h
index 46526ed..3c94301 100644
--- a/cc/layers/picture_layer_impl.h
+++ b/cc/layers/picture_layer_impl.h
@@ -60,7 +60,7 @@ class CC_EXPORT PictureLayerImpl
gfx::Size content_bounds) const OVERRIDE;
virtual const Region* GetInvalidation() OVERRIDE;
virtual const PictureLayerTiling* GetTwinTiling(
- const PictureLayerTiling* tiling) const OVERRIDE;
+ const PictureLayerTiling* tiling) OVERRIDE;
// PushPropertiesTo active tree => pending tree.
void SyncTiling(const PictureLayerTiling* tiling);
@@ -91,13 +91,6 @@ class CC_EXPORT PictureLayerImpl
void UpdateLCDTextStatus(bool new_status);
void ResetRasterScale();
void MarkVisibleResourcesAsRequired() const;
- bool MarkVisibleTilesAsRequired(
- PictureLayerTiling* tiling,
- const PictureLayerTiling* optional_twin_tiling,
- float contents_scale,
- gfx::Rect rect,
- Region* missing_region) const;
-
void DoPostCommitInitializationIfNeeded() {
if (needs_post_commit_initialization_)
DoPostCommitInitialization();
diff --git a/cc/layers/picture_layer_impl_unittest.cc b/cc/layers/picture_layer_impl_unittest.cc
index 8d70bc7..5a4980f 100644
--- a/cc/layers/picture_layer_impl_unittest.cc
+++ b/cc/layers/picture_layer_impl_unittest.cc
@@ -76,13 +76,6 @@ class PictureLayerImplTest : public testing::Test {
host_impl_.active_tree()->LayerById(id_));
}
- void SetupDefaultTreesWithFixedTileSize(gfx::Size layer_bounds,
- gfx::Size tile_size) {
- SetupDefaultTrees(layer_bounds);
- pending_layer_->set_fixed_tile_size(tile_size);
- active_layer_->set_fixed_tile_size(tile_size);
- }
-
void SetupTrees(
scoped_refptr<PicturePileImpl> pending_pile,
scoped_refptr<PicturePileImpl> active_pile) {
@@ -91,14 +84,6 @@ class PictureLayerImplTest : public testing::Test {
SetupPendingTree(pending_pile);
}
- void CreateHighLowResAndSetAllTilesVisible() {
- // Active layer must get updated first so pending layer can share from it.
- active_layer_->CreateDefaultTilingsAndTiles();
- active_layer_->SetAllTilesVisible();
- pending_layer_->CreateDefaultTilingsAndTiles();
- pending_layer_->SetAllTilesVisible();
- }
-
void AddDefaultTilingsWithInvalidation(const Region& invalidation) {
active_layer_->AddTiling(2.3f);
active_layer_->AddTiling(1.0f);
@@ -168,20 +153,6 @@ class PictureLayerImplTest : public testing::Test {
active_layer_->DidLoseOutputSurface();
}
- void AssertAllTilesRequired(PictureLayerTiling* tiling) {
- std::vector<Tile*> tiles = tiling->AllTilesForTesting();
- for (size_t i = 0; i < tiles.size(); ++i)
- EXPECT_TRUE(tiles[i]->required_for_activation()) << "i: " << i;
- EXPECT_GT(tiles.size(), 0u);
- }
-
- void AssertNoTilesRequired(PictureLayerTiling* tiling) {
- std::vector<Tile*> tiles = tiling->AllTilesForTesting();
- for (size_t i = 0; i < tiles.size(); ++i)
- EXPECT_FALSE(tiles[i]->required_for_activation()) << "i: " << i;
- EXPECT_GT(tiles.size(), 0u);
- }
-
protected:
void TestTileGridAlignmentCommon() {
// Layer to span 4 raster tiles in x and in y
@@ -1255,124 +1226,6 @@ TEST_F(PictureLayerImplTest, MarkRequiredOffscreenTiles) {
EXPECT_GT(num_offscreen, 0);
}
-TEST_F(PictureLayerImplTest, HighResRequiredWhenUnsharedActiveAllReady) {
- gfx::Size layer_bounds(400, 400);
- gfx::Size tile_size(100, 100);
- SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size);
-
- // No tiles shared.
- pending_layer_->set_invalidation(gfx::Rect(layer_bounds));
-
- CreateHighLowResAndSetAllTilesVisible();
-
- active_layer_->SetAllTilesReady();
-
- // No shared tiles and all active tiles ready, so pending can only
- // activate with all high res tiles.
- pending_layer_->MarkVisibleResourcesAsRequired();
- AssertAllTilesRequired(pending_layer_->HighResTiling());
- AssertNoTilesRequired(pending_layer_->LowResTiling());
-}
-
-TEST_F(PictureLayerImplTest, NothingRequiredIfAllHighResTilesShared) {
- gfx::Size layer_bounds(400, 400);
- gfx::Size tile_size(100, 100);
- SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size);
-
- CreateHighLowResAndSetAllTilesVisible();
-
- Tile* some_active_tile =
- active_layer_->HighResTiling()->AllTilesForTesting()[0];
- EXPECT_FALSE(some_active_tile->IsReadyToDraw());
-
- // All tiles shared (no invalidation), so even though the active tree's
- // tiles aren't ready, there is nothing required.
- pending_layer_->MarkVisibleResourcesAsRequired();
- AssertNoTilesRequired(pending_layer_->HighResTiling());
- AssertNoTilesRequired(pending_layer_->LowResTiling());
-}
-
-TEST_F(PictureLayerImplTest, NothingRequiredIfActiveMissingTiles) {
- gfx::Size layer_bounds(400, 400);
- gfx::Size tile_size(100, 100);
- scoped_refptr<FakePicturePileImpl> pending_pile =
- FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds);
- // An arbitrary bogus outside the layer recording. Enough for the layer to
- // think it can create tiles, but not in bounds so all tiles are null.
- Region active_recorded_region;
- active_recorded_region.Union(gfx::Rect(1000, 1000, 1, 1));
- scoped_refptr<FakePicturePileImpl> active_pile =
- FakePicturePileImpl::CreatePileWithRecordedRegion(
- tile_size, layer_bounds, active_recorded_region);
- SetupTrees(pending_pile, active_pile);
- pending_layer_->set_fixed_tile_size(tile_size);
- active_layer_->set_fixed_tile_size(tile_size);
-
- CreateHighLowResAndSetAllTilesVisible();
-
- // Active layer has tilings, but no tiles due to missing recordings.
- EXPECT_TRUE(active_layer_->CanHaveTilings());
- EXPECT_EQ(active_layer_->tilings()->num_tilings(), 2u);
- EXPECT_EQ(active_layer_->HighResTiling()->AllTilesForTesting().size(), 0u);
-
- // Since the active layer has no tiles at all, the pending layer doesn't
- // need content in order to activate. This is attempting to simulate
- // scrolling past the end of recorded content on the active layer.
- pending_layer_->MarkVisibleResourcesAsRequired();
- AssertNoTilesRequired(pending_layer_->HighResTiling());
- AssertNoTilesRequired(pending_layer_->LowResTiling());
-}
-
-TEST_F(PictureLayerImplTest, HighResRequiredIfActiveCantHaveTiles) {
- gfx::Size layer_bounds(400, 400);
- gfx::Size tile_size(100, 100);
- scoped_refptr<FakePicturePileImpl> pending_pile =
- FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds);
- scoped_refptr<FakePicturePileImpl> active_pile =
- FakePicturePileImpl::CreateEmptyPile(tile_size, layer_bounds);
- SetupTrees(pending_pile, active_pile);
- pending_layer_->set_fixed_tile_size(tile_size);
- active_layer_->set_fixed_tile_size(tile_size);
-
- CreateHighLowResAndSetAllTilesVisible();
-
- // Active layer can't have tiles.
- EXPECT_FALSE(active_layer_->CanHaveTilings());
-
- // All high res tiles required. This should be considered identical
- // to the case where there is no active layer, to avoid flashing content.
- // This can happen if a layer exists for a while and switches from
- // not being able to have content to having content.
- pending_layer_->MarkVisibleResourcesAsRequired();
- AssertAllTilesRequired(pending_layer_->HighResTiling());
- AssertNoTilesRequired(pending_layer_->LowResTiling());
-}
-
-TEST_F(PictureLayerImplTest, LowResRequiredWhenMissingHighRes) {
- gfx::Size layer_bounds(400, 400);
- gfx::Size tile_size(100, 100);
- SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size);
-
- // No tiles shared.
- pending_layer_->set_invalidation(gfx::Rect(layer_bounds));
-
- CreateHighLowResAndSetAllTilesVisible();
-
- // Only set the active low res tiles as being ready.
- active_layer_->SetAllTilesReadyInTiling(active_layer_->LowResTiling());
- // Verify high res not active.
- Tile* some_active_tile =
- active_layer_->HighResTiling()->AllTilesForTesting()[0];
- EXPECT_FALSE(some_active_tile->IsReadyToDraw());
-
- // Active layer's high res tiles aren't ready but low res ones are, so
- // the pending needs to at least have its low res tiles ready in order
- // to activate in order to not flash content.
- pending_layer_->MarkVisibleResourcesAsRequired();
- AssertNoTilesRequired(pending_layer_->HighResTiling());
- AssertAllTilesRequired(pending_layer_->LowResTiling());
-}
-
TEST_F(PictureLayerImplTest, ActivateUninitializedLayer) {
gfx::Size tile_size(100, 100);
gfx::Size layer_bounds(400, 400);
diff --git a/cc/resources/picture_layer_tiling.h b/cc/resources/picture_layer_tiling.h
index dae6272..7d7626e 100644
--- a/cc/resources/picture_layer_tiling.h
+++ b/cc/resources/picture_layer_tiling.h
@@ -34,7 +34,7 @@ class CC_EXPORT PictureLayerTilingClient {
gfx::Size content_bounds) const = 0;
virtual const Region* GetInvalidation() = 0;
virtual const PictureLayerTiling* GetTwinTiling(
- const PictureLayerTiling* tiling) const = 0;
+ const PictureLayerTiling* tiling) = 0;
protected:
virtual ~PictureLayerTilingClient() {}
@@ -78,8 +78,6 @@ class CC_EXPORT PictureLayerTiling {
return all_tiles;
}
- Tile* TileAt(int i, int j) const;
-
// Iterate over all tiles to fill content_rect. Even if tiles are invalid
// (i.e. no valid resource) this tiling should still iterate over them.
// The union of all geometry_rect calls for each element iterated over should
@@ -109,9 +107,6 @@ class CC_EXPORT PictureLayerTiling {
CoverageIterator& operator++();
operator bool() const { return tile_j_ <= bottom_; }
- int i() const { return tile_i_; }
- int j() const { return tile_j_; }
-
private:
const PictureLayerTiling* tiling_;
gfx::Rect dest_rect_;
@@ -197,6 +192,7 @@ class CC_EXPORT PictureLayerTiling {
PictureLayerTilingClient* client);
void SetLiveTilesRect(gfx::Rect live_tiles_rect);
void CreateTile(int i, int j, const PictureLayerTiling* twin_tiling);
+ Tile* TileAt(int, int) const;
// Given properties.
float contents_scale_;
diff --git a/cc/resources/picture_pile_base.h b/cc/resources/picture_pile_base.h
index 66a26e75..e78778a 100644
--- a/cc/resources/picture_pile_base.h
+++ b/cc/resources/picture_pile_base.h
@@ -65,10 +65,6 @@ class CC_EXPORT PicturePileBase : public base::RefCounted<PicturePileBase> {
virtual ~PicturePileBase();
- void SetRecordedRegionForTesting(const Region& recorded_region) {
- recorded_region_ = recorded_region;
- }
-
int num_raster_threads() { return num_raster_threads_; }
int buffer_pixels() const { return tiling_.border_texels(); }
void Clear();
diff --git a/cc/resources/tile.h b/cc/resources/tile.h
index 440c6b0..fd184a6 100644
--- a/cc/resources/tile.h
+++ b/cc/resources/tile.h
@@ -111,7 +111,6 @@ class CC_EXPORT Tile : public RefCountedManaged<Tile> {
friend class PrioritizedTileSet;
friend class FakeTileManager;
friend class BinComparator;
- friend class FakePictureLayerImpl;
// Methods called by by tile manager.
Tile(TileManager* tile_manager,
diff --git a/cc/test/fake_picture_layer_impl.cc b/cc/test/fake_picture_layer_impl.cc
index 6e9ffde..bdf40a5 100644
--- a/cc/test/fake_picture_layer_impl.cc
+++ b/cc/test/fake_picture_layer_impl.cc
@@ -4,10 +4,6 @@
#include "cc/test/fake_picture_layer_impl.h"
-#include <vector>
-#include "cc/resources/tile.h"
-#include "cc/trees/layer_tree_impl.h"
-
namespace cc {
FakePictureLayerImpl::FakePictureLayerImpl(
@@ -70,57 +66,4 @@ PictureLayerTiling* FakePictureLayerImpl::LowResTiling() const {
return result;
}
-void FakePictureLayerImpl::SetAllTilesVisible() {
- WhichTree tree =
- layer_tree_impl()->IsActiveTree() ? ACTIVE_TREE : PENDING_TREE;
-
- for (size_t tiling_idx = 0; tiling_idx < tilings_->num_tilings();
- ++tiling_idx) {
- PictureLayerTiling* tiling = tilings_->tiling_at(tiling_idx);
- std::vector<Tile*> tiles = tiling->AllTilesForTesting();
- for (size_t tile_idx = 0; tile_idx < tiles.size(); ++tile_idx) {
- Tile* tile = tiles[tile_idx];
- TilePriority priority;
- priority.resolution = HIGH_RESOLUTION;
- priority.time_to_visible_in_seconds = 0.f;
- priority.distance_to_visible_in_pixels = 0.f;
- tile->SetPriority(tree, priority);
- }
- }
-}
-
-void FakePictureLayerImpl::SetAllTilesReady() {
- for (size_t tiling_idx = 0; tiling_idx < tilings_->num_tilings();
- ++tiling_idx) {
- PictureLayerTiling* tiling = tilings_->tiling_at(tiling_idx);
- SetAllTilesReadyInTiling(tiling);
- }
-}
-
-void FakePictureLayerImpl::SetAllTilesReadyInTiling(
- PictureLayerTiling* tiling) {
- std::vector<Tile*> tiles = tiling->AllTilesForTesting();
- for (size_t tile_idx = 0; tile_idx < tiles.size(); ++tile_idx) {
- Tile* tile = tiles[tile_idx];
- ManagedTileState& state = tile->managed_state();
- for (size_t mode_idx = 0; mode_idx < NUM_RASTER_MODES; ++mode_idx)
- state.tile_versions[mode_idx].SetSolidColorForTesting(true);
- DCHECK(tile->IsReadyToDraw());
- }
-}
-
-void FakePictureLayerImpl::CreateDefaultTilingsAndTiles() {
- layer_tree_impl()->UpdateDrawProperties();
-
- if (CanHaveTilings()) {
- DCHECK_EQ(tilings()->num_tilings(), 2u);
- DCHECK_EQ(tilings()->tiling_at(0)->resolution(), HIGH_RESOLUTION);
- DCHECK_EQ(tilings()->tiling_at(1)->resolution(), LOW_RESOLUTION);
- HighResTiling()->CreateAllTilesForTesting();
- LowResTiling()->CreateAllTilesForTesting();
- } else {
- DCHECK_EQ(tilings()->num_tilings(), 0u);
- }
-}
-
} // namespace cc
diff --git a/cc/test/fake_picture_layer_impl.h b/cc/test/fake_picture_layer_impl.h
index 0348377..759ceeb 100644
--- a/cc/test/fake_picture_layer_impl.h
+++ b/cc/test/fake_picture_layer_impl.h
@@ -55,11 +55,6 @@ class FakePictureLayerImpl : public PictureLayerImpl {
void set_fixed_tile_size(gfx::Size size) { fixed_tile_size_ = size; }
- void CreateDefaultTilingsAndTiles();
- void SetAllTilesVisible();
- void SetAllTilesReady();
- void SetAllTilesReadyInTiling(PictureLayerTiling* tiling);
-
protected:
FakePictureLayerImpl(
LayerTreeImpl* tree_impl,
diff --git a/cc/test/fake_picture_layer_tiling_client.cc b/cc/test/fake_picture_layer_tiling_client.cc
index 7ebd179..597e0d8 100644
--- a/cc/test/fake_picture_layer_tiling_client.cc
+++ b/cc/test/fake_picture_layer_tiling_client.cc
@@ -63,7 +63,7 @@ const Region* FakePictureLayerTilingClient::GetInvalidation() {
}
const PictureLayerTiling* FakePictureLayerTilingClient::GetTwinTiling(
- const PictureLayerTiling* tiling) const {
+ const PictureLayerTiling* tiling) {
return twin_tiling_;
}
diff --git a/cc/test/fake_picture_layer_tiling_client.h b/cc/test/fake_picture_layer_tiling_client.h
index 4b092e8..1ad9c24 100644
--- a/cc/test/fake_picture_layer_tiling_client.h
+++ b/cc/test/fake_picture_layer_tiling_client.h
@@ -34,7 +34,7 @@ class FakePictureLayerTilingClient : public PictureLayerTilingClient {
virtual const Region* GetInvalidation() OVERRIDE;
virtual const PictureLayerTiling* GetTwinTiling(
- const PictureLayerTiling* tiling) const OVERRIDE;
+ const PictureLayerTiling* tiling) OVERRIDE;
void set_twin_tiling(PictureLayerTiling* tiling) { twin_tiling_ = tiling; }
void set_text_rect(gfx::Rect rect) { text_rect_ = rect; }
diff --git a/cc/test/fake_picture_pile_impl.cc b/cc/test/fake_picture_pile_impl.cc
index 88c7d38..989c4f9 100644
--- a/cc/test/fake_picture_pile_impl.cc
+++ b/cc/test/fake_picture_pile_impl.cc
@@ -42,19 +42,6 @@ scoped_refptr<FakePicturePileImpl> FakePicturePileImpl::CreateEmptyPile(
return pile;
}
-scoped_refptr<FakePicturePileImpl>
-FakePicturePileImpl::CreatePileWithRecordedRegion(
- gfx::Size tile_size,
- gfx::Size layer_bounds,
- const Region& recorded_region) {
- scoped_refptr<FakePicturePileImpl> pile(new FakePicturePileImpl());
- pile->tiling().SetTotalSize(layer_bounds);
- pile->tiling().SetMaxTextureSize(tile_size);
- pile->SetTileGridSize(ImplSidePaintingSettings().default_tile_size);
- pile->SetRecordedRegionForTesting(recorded_region);
- return pile;
-}
-
scoped_refptr<FakePicturePileImpl> FakePicturePileImpl::CreatePile() {
scoped_refptr<FakePicturePileImpl> pile(new FakePicturePileImpl());
gfx::Size size(std::numeric_limits<int>::max(),
diff --git a/cc/test/fake_picture_pile_impl.h b/cc/test/fake_picture_pile_impl.h
index 20d44e3..ae8729e 100644
--- a/cc/test/fake_picture_pile_impl.h
+++ b/cc/test/fake_picture_pile_impl.h
@@ -21,11 +21,6 @@ class FakePicturePileImpl : public PicturePileImpl {
gfx::Size tile_size,
gfx::Size layer_bounds);
- static scoped_refptr<FakePicturePileImpl> CreatePileWithRecordedRegion(
- gfx::Size tile_size,
- gfx::Size layer_bounds,
- const Region& recorded_region);
-
static scoped_refptr<FakePicturePileImpl> CreatePile();
TilingData& tiling() { return tiling_; }