| 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/tiles/picture_layer_tiling_set.h" | 5 #include "cc/tiles/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_provider.h" | 10 #include "cc/resources/resource_provider.h" |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 | 229 |
| 230 class PictureLayerTilingSetTestWithResources : public testing::Test { | 230 class PictureLayerTilingSetTestWithResources : public testing::Test { |
| 231 public: | 231 public: |
| 232 void RunTest(int num_tilings, | 232 void RunTest(int num_tilings, |
| 233 float min_scale, | 233 float min_scale, |
| 234 float scale_increment, | 234 float scale_increment, |
| 235 float ideal_contents_scale, | 235 float ideal_contents_scale, |
| 236 float expected_scale) { | 236 float expected_scale) { |
| 237 FakeOutputSurfaceClient output_surface_client; | 237 FakeOutputSurfaceClient output_surface_client; |
| 238 std::unique_ptr<FakeOutputSurface> output_surface = | 238 std::unique_ptr<FakeOutputSurface> output_surface = |
| 239 FakeOutputSurface::Create3d(); | 239 FakeOutputSurface::CreateDelegating3d(); |
| 240 CHECK(output_surface->BindToClient(&output_surface_client)); | 240 CHECK(output_surface->BindToClient(&output_surface_client)); |
| 241 | 241 |
| 242 std::unique_ptr<SharedBitmapManager> shared_bitmap_manager( | 242 std::unique_ptr<SharedBitmapManager> shared_bitmap_manager( |
| 243 new TestSharedBitmapManager()); | 243 new TestSharedBitmapManager()); |
| 244 std::unique_ptr<ResourceProvider> resource_provider = | 244 std::unique_ptr<ResourceProvider> resource_provider = |
| 245 FakeResourceProvider::Create(output_surface.get(), | 245 FakeResourceProvider::Create(output_surface.get(), |
| 246 shared_bitmap_manager.get()); | 246 shared_bitmap_manager.get()); |
| 247 | 247 |
| 248 FakePictureLayerTilingClient client(resource_provider.get()); | 248 FakePictureLayerTilingClient client(resource_provider.get()); |
| 249 client.SetTileSize(gfx::Size(256, 256)); | 249 client.SetTileSize(gfx::Size(256, 256)); |
| (...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 979 | 979 |
| 980 // This will invalidate tilings. | 980 // This will invalidate tilings. |
| 981 tiling_set->UpdateRasterSourceDueToLCDChange(raster_source, Region()); | 981 tiling_set->UpdateRasterSourceDueToLCDChange(raster_source, Region()); |
| 982 | 982 |
| 983 EXPECT_TRUE( | 983 EXPECT_TRUE( |
| 984 tiling_set->UpdateTilePriorities(viewport, 1.f, time, Occlusion(), true)); | 984 tiling_set->UpdateTilePriorities(viewport, 1.f, time, Occlusion(), true)); |
| 985 } | 985 } |
| 986 | 986 |
| 987 } // namespace | 987 } // namespace |
| 988 } // namespace cc | 988 } // namespace cc |
| OLD | NEW |