| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/resources/picture_layer_tiling_set.h" | 5 #include "cc/resources/picture_layer_tiling_set.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "cc/resources/resource_pool.h" | 10 #include "cc/resources/resource_pool.h" |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 scoped_ptr<FakeOutputSurface> output_surface = | 199 scoped_ptr<FakeOutputSurface> output_surface = |
| 200 FakeOutputSurface::Create3d(); | 200 FakeOutputSurface::Create3d(); |
| 201 CHECK(output_surface->BindToClient(&output_surface_client)); | 201 CHECK(output_surface->BindToClient(&output_surface_client)); |
| 202 | 202 |
| 203 scoped_ptr<SharedBitmapManager> shared_bitmap_manager( | 203 scoped_ptr<SharedBitmapManager> shared_bitmap_manager( |
| 204 new TestSharedBitmapManager()); | 204 new TestSharedBitmapManager()); |
| 205 scoped_ptr<ResourceProvider> resource_provider = | 205 scoped_ptr<ResourceProvider> resource_provider = |
| 206 ResourceProvider::Create(output_surface.get(), | 206 ResourceProvider::Create(output_surface.get(), |
| 207 shared_bitmap_manager.get(), | 207 shared_bitmap_manager.get(), |
| 208 NULL, | 208 NULL, |
| 209 NULL, |
| 209 0, | 210 0, |
| 210 false, | 211 false, |
| 211 1, | 212 1, |
| 212 false); | 213 false); |
| 213 | 214 |
| 214 FakePictureLayerTilingClient client(resource_provider.get()); | 215 FakePictureLayerTilingClient client(resource_provider.get()); |
| 215 client.SetTileSize(gfx::Size(256, 256)); | 216 client.SetTileSize(gfx::Size(256, 256)); |
| 216 client.set_tree(PENDING_TREE); | 217 client.set_tree(PENDING_TREE); |
| 217 gfx::Size layer_bounds(1000, 800); | 218 gfx::Size layer_bounds(1000, 800); |
| 218 PictureLayerTilingSet set(&client, layer_bounds); | 219 PictureLayerTilingSet set(&client, layer_bounds); |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 std::vector<Tile*> new_tiles = target_->tiling_at(0)->AllTilesForTesting(); | 558 std::vector<Tile*> new_tiles = target_->tiling_at(0)->AllTilesForTesting(); |
| 558 for (size_t i = 0; i < original_tiles.size(); ++i) { | 559 for (size_t i = 0; i < original_tiles.size(); ++i) { |
| 559 std::vector<Tile*>::iterator find = | 560 std::vector<Tile*>::iterator find = |
| 560 std::find(new_tiles.begin(), new_tiles.end(), original_tiles[i]); | 561 std::find(new_tiles.begin(), new_tiles.end(), original_tiles[i]); |
| 561 EXPECT_TRUE(find == new_tiles.end()); | 562 EXPECT_TRUE(find == new_tiles.end()); |
| 562 } | 563 } |
| 563 } | 564 } |
| 564 | 565 |
| 565 } // namespace | 566 } // namespace |
| 566 } // namespace cc | 567 } // namespace cc |
| OLD | NEW |