Commit 13ed2e69 authored by danakj's avatar danakj Committed by Commit bot

cc: Remove an old unittest trying to verify parameters in PicturePile

This was a PictureLayerImpl test verifying the parameters given
to the SkPicture recording backing a PicturePile. But these are
not those days any more. PicturePile in 2016? Nope.

R=vmpstr@chromium.org
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel

Review-Url: https://codereview.chromium.org/2592183002
Cr-Commit-Position: refs/heads/master@{#440183}
parent 577ff023
...@@ -289,72 +289,6 @@ class NoLowResPictureLayerImplTest : public PictureLayerImplTest { ...@@ -289,72 +289,6 @@ class NoLowResPictureLayerImplTest : public PictureLayerImplTest {
} }
}; };
TEST_F(PictureLayerImplTest, TileGridAlignment) {
// Layer to span 4 raster tiles in x and in y
LayerTreeSettings settings;
gfx::Size layer_size(settings.default_tile_size.width() * 7 / 2,
settings.default_tile_size.height() * 7 / 2);
scoped_refptr<FakeRasterSource> pending_raster_source =
FakeRasterSource::CreateFilled(layer_size);
// Create an active recording source, but make sure it's not solid.
std::unique_ptr<FakeRecordingSource> active_recording_source =
FakeRecordingSource::CreateFilledRecordingSource(layer_size);
active_recording_source->SetLayerBounds(layer_size);
active_recording_source->add_draw_rect(gfx::Rect(layer_size));
active_recording_source->add_draw_rect(
gfx::Rect(0, 0, layer_size.width() - 1, layer_size.height() - 1));
active_recording_source->Rerecord();
scoped_refptr<FakeRasterSource> active_raster_source =
FakeRasterSource::CreateFromRecordingSource(active_recording_source.get(),
false);
SetupTrees(pending_raster_source, active_raster_source);
// Add 1x1 rects at the centers of each tile, then re-record recording source
// contents.
active_layer()->tilings()->tiling_at(0)->CreateAllTilesForTesting();
std::vector<Tile*> tiles =
active_layer()->tilings()->tiling_at(0)->AllTilesForTesting();
EXPECT_EQ(16u, tiles.size());
std::vector<SkRect> rects;
std::vector<Tile*>::const_iterator tile_iter;
active_recording_source->reset_draws();
for (tile_iter = tiles.begin(); tile_iter < tiles.end(); tile_iter++) {
gfx::Point tile_center = (*tile_iter)->content_rect().CenterPoint();
gfx::Rect rect(tile_center.x(), tile_center.y(), 1, 1);
active_recording_source->add_draw_rect(rect);
rects.push_back(SkRect::MakeXYWH(rect.x(), rect.y(), 1, 1));
}
// Force re-raster with newly injected content
active_recording_source->Rerecord();
scoped_refptr<FakeRasterSource> updated_active_raster_source =
FakeRasterSource::CreateFromRecordingSource(active_recording_source.get(),
false);
RasterSource::PlaybackSettings playback_settings;
playback_settings.playback_to_shared_canvas = true;
std::vector<SkRect>::const_iterator rect_iter = rects.begin();
for (tile_iter = tiles.begin(); tile_iter < tiles.end(); tile_iter++) {
MockCanvas mock_canvas(1000, 1000);
const gfx::Rect& content_rect = (*tile_iter)->content_rect();
updated_active_raster_source->RasterSource::PlaybackToCanvas(
&mock_canvas, content_rect, content_rect, gfx::SizeF(1.f, 1.f),
playback_settings);
// This test verifies that when drawing the contents of a specific tile
// at content scale 1.0, the playback canvas never receives content from
// neighboring tiles which indicates that the tile grid embedded in
// SkPicture is perfectly aligned with the compositor's tiles.
EXPECT_EQ(1u, mock_canvas.rects_.size());
EXPECT_EQ(*rect_iter, mock_canvas.rects_[0]);
rect_iter++;
}
}
TEST_F(PictureLayerImplTest, CloneNoInvalidation) { TEST_F(PictureLayerImplTest, CloneNoInvalidation) {
gfx::Size layer_bounds(400, 400); gfx::Size layer_bounds(400, 400);
SetupDefaultTrees(layer_bounds); SetupDefaultTrees(layer_bounds);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment