| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "cc/layers/picture_layer.h" | 5 #include "cc/layers/picture_layer.h" |
| 6 | 6 |
| 7 #include "cc/layers/content_layer_client.h" | 7 #include "cc/layers/content_layer_client.h" |
| 8 #include "cc/layers/picture_layer_impl.h" | 8 #include "cc/layers/picture_layer_impl.h" |
| 9 #include "cc/resources/resource_update_queue.h" | 9 #include "cc/resources/resource_update_queue.h" |
| 10 #include "cc/test/fake_layer_tree_host.h" | 10 #include "cc/test/fake_layer_tree_host.h" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 settings.default_tile_grid_size = gfx::Size(123, 123); | 99 settings.default_tile_grid_size = gfx::Size(123, 123); |
| 100 | 100 |
| 101 MockContentLayerClient client; | 101 MockContentLayerClient client; |
| 102 scoped_refptr<PictureLayer> layer = PictureLayer::Create(&client); | 102 scoped_refptr<PictureLayer> layer = PictureLayer::Create(&client); |
| 103 FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D); | 103 FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D); |
| 104 scoped_ptr<FakeLayerTreeHost> host = | 104 scoped_ptr<FakeLayerTreeHost> host = |
| 105 FakeLayerTreeHost::Create(&host_client, settings); | 105 FakeLayerTreeHost::Create(&host_client, settings); |
| 106 host->SetRootLayer(layer); | 106 host->SetRootLayer(layer); |
| 107 | 107 |
| 108 // Tile-grid is set according to its setting. | 108 // Tile-grid is set according to its setting. |
| 109 SkTileGridFactory::TileGridInfo info = | 109 gfx::Size size = |
| 110 layer->GetRecordingSourceForTesting()->GetTileGridInfoForTesting(); | 110 layer->GetRecordingSourceForTesting()->GetTileGridSizeForTesting(); |
| 111 EXPECT_EQ(info.fTileInterval.width(), 123 - 2 * info.fMargin.width()); | 111 EXPECT_EQ(size.width(), 123); |
| 112 EXPECT_EQ(info.fTileInterval.height(), 123 - 2 * info.fMargin.height()); | 112 EXPECT_EQ(size.height(), 123); |
| 113 } | 113 } |
| 114 | 114 |
| 115 } // namespace | 115 } // namespace |
| 116 } // namespace cc | 116 } // namespace cc |
| OLD | NEW |