diff options
author | weiliangc <weiliangc@chromium.org> | 2015-01-16 16:28:31 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-17 00:30:03 +0000 |
commit | 6b9b19469d53e663a5fd56f8b9cda40de730caea (patch) | |
tree | 0e5b0182feedf8fcf59a8985d2b677b88f703339 /cc/layers/picture_layer_unittest.cc | |
parent | c24f902a6fdbfa0b1907209f925734d9ace3c67c (diff) | |
download | chromium_src-6b9b19469d53e663a5fd56f8b9cda40de730caea.zip chromium_src-6b9b19469d53e663a5fd56f8b9cda40de730caea.tar.gz chromium_src-6b9b19469d53e663a5fd56f8b9cda40de730caea.tar.bz2 |
Remove Unnecessary Use of |TileGridInfo|, Use Size Instead
In Picture related classes, |TileGridInfo| is used when we only care
about size of grid, so stop using |TileGridInfo|.
In PicturePile class we compute |TileGridInfo| from tile grid size and
a constant for margin, then in Picture class we get back grid size from
|TileGridInfo|. This back and force conversion is unnecessary.
BUG=447662
Review URL: https://codereview.chromium.org/856853003
Cr-Commit-Position: refs/heads/master@{#311988}
Diffstat (limited to 'cc/layers/picture_layer_unittest.cc')
-rw-r--r-- | cc/layers/picture_layer_unittest.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cc/layers/picture_layer_unittest.cc b/cc/layers/picture_layer_unittest.cc index ac20e4c..9327e13 100644 --- a/cc/layers/picture_layer_unittest.cc +++ b/cc/layers/picture_layer_unittest.cc @@ -106,10 +106,10 @@ TEST(PictureLayerTest, UseTileGridSize) { host->SetRootLayer(layer); // Tile-grid is set according to its setting. - SkTileGridFactory::TileGridInfo info = - layer->GetRecordingSourceForTesting()->GetTileGridInfoForTesting(); - EXPECT_EQ(info.fTileInterval.width(), 123 - 2 * info.fMargin.width()); - EXPECT_EQ(info.fTileInterval.height(), 123 - 2 * info.fMargin.height()); + gfx::Size size = + layer->GetRecordingSourceForTesting()->GetTileGridSizeForTesting(); + EXPECT_EQ(size.width(), 123); + EXPECT_EQ(size.height(), 123); } } // namespace |