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/layers/picture_layer_impl_unittest.cc

Issue 751453005: Clip a layer when its render target's render surface is clipped. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « no previous file | cc/layers/tiled_layer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_layer_impl_unittest.cc
diff --git a/cc/layers/picture_layer_impl_unittest.cc b/cc/layers/picture_layer_impl_unittest.cc
index 246e62581257c61880f45a78262c8b6a77f80c15..441eab70ecaf5f65fc4f6c5b7d56e66408447981 100644
--- a/cc/layers/picture_layer_impl_unittest.cc
+++ b/cc/layers/picture_layer_impl_unittest.cc
@@ -1890,6 +1890,9 @@ TEST_F(PictureLayerImplTest,
TEST_F(PictureLayerImplTest, HighResRequiredWhenUnsharedActiveAllReady) {
gfx::Size layer_bounds(400, 400);
gfx::Size tile_size(100, 100);
+
+ host_impl_.SetViewportSize(layer_bounds);
+
SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size);
// No tiles shared.
@@ -1911,6 +1914,9 @@ TEST_F(PictureLayerImplTest, HighResRequiredWhenUnsharedActiveAllReady) {
TEST_F(PictureLayerImplTest, HighResRequiredWhenMissingHighResFlagOn) {
gfx::Size layer_bounds(400, 400);
gfx::Size tile_size(100, 100);
+
+ host_impl_.SetViewportSize(layer_bounds);
+
SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size);
// All tiles shared (no invalidation).
@@ -1935,6 +1941,9 @@ TEST_F(PictureLayerImplTest, HighResRequiredWhenMissingHighResFlagOn) {
TEST_F(PictureLayerImplTest, AllHighResRequiredEvenIfShared) {
gfx::Size layer_bounds(400, 400);
gfx::Size tile_size(100, 100);
+
+ host_impl_.SetViewportSize(layer_bounds);
+
SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size);
CreateHighLowResAndSetAllTilesVisible();
@@ -2009,6 +2018,9 @@ TEST_F(PictureLayerImplTest, NothingRequiredIfActiveMissingTiles) {
TEST_F(PictureLayerImplTest, HighResRequiredIfActiveCantHaveTiles) {
gfx::Size layer_bounds(400, 400);
gfx::Size tile_size(100, 100);
+
+ host_impl_.SetViewportSize(layer_bounds);
+
scoped_refptr<FakePicturePileImpl> pending_pile =
FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds);
scoped_refptr<FakePicturePileImpl> active_pile =
@@ -3155,6 +3167,8 @@ TEST_F(PictureLayerImplTest, LowResReadyToDrawNotEnoughToActivate) {
gfx::Size tile_size(100, 100);
gfx::Size layer_bounds(1000, 1000);
+ host_impl_.SetViewportSize(layer_bounds);
+
SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size);
// Make sure some tiles are not shared.
@@ -3182,6 +3196,8 @@ TEST_F(PictureLayerImplTest, HighResReadyToDrawEnoughToActivate) {
gfx::Size tile_size(100, 100);
gfx::Size layer_bounds(1000, 1000);
+ host_impl_.SetViewportSize(layer_bounds);
+
SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size);
// Make sure some tiles are not shared.
@@ -3205,6 +3221,8 @@ TEST_F(PictureLayerImplTest,
gfx::Size tile_size(100, 100);
gfx::Size layer_bounds(1000, 1000);
+ host_impl_.SetViewportSize(layer_bounds);
+
SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size);
// Make sure some tiles are not shared.
@@ -3229,6 +3247,8 @@ TEST_F(PictureLayerImplTest, SharedActiveHighResReadyNotEnoughToActivate) {
gfx::Size tile_size(100, 100);
gfx::Size layer_bounds(1000, 1000);
+ host_impl_.SetViewportSize(layer_bounds);
+
SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size);
// Make sure some tiles are not shared.
@@ -3316,6 +3336,9 @@ TEST_F(NoLowResPictureLayerImplTest, ManageTilingsCreatesTilings) {
TEST_F(NoLowResPictureLayerImplTest, AllHighResRequiredEvenIfShared) {
gfx::Size layer_bounds(400, 400);
gfx::Size tile_size(100, 100);
+
+ host_impl_.SetViewportSize(layer_bounds);
+
SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size);
CreateHighLowResAndSetAllTilesVisible();
@@ -3677,6 +3700,8 @@ TEST_F(PictureLayerImplTest, SharedQuadStateContainsMaxTilingScale) {
gfx::Size tile_size(400, 400);
gfx::Size layer_bounds(1000, 2000);
+ host_impl_.SetViewportSize(layer_bounds);
+
scoped_refptr<FakePicturePileImpl> pending_pile =
FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds);
scoped_refptr<FakePicturePileImpl> active_pile =
« no previous file with comments | « no previous file | cc/layers/tiled_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698