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 <algorithm> | 5 #include <algorithm> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "cc/resources/managed_tile_state.h" | 8 #include "cc/resources/managed_tile_state.h" |
9 #include "cc/resources/prioritized_tile_set.h" | 9 #include "cc/resources/prioritized_tile_set.h" |
10 #include "cc/resources/tile.h" | 10 #include "cc/resources/tile.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 | 50 |
51 class PrioritizedTileSetTest : public testing::Test { | 51 class PrioritizedTileSetTest : public testing::Test { |
52 public: | 52 public: |
53 PrioritizedTileSetTest() { | 53 PrioritizedTileSetTest() { |
54 output_surface_ = FakeOutputSurface::Create3d().Pass(); | 54 output_surface_ = FakeOutputSurface::Create3d().Pass(); |
55 CHECK(output_surface_->BindToClient(&output_surface_client_)); | 55 CHECK(output_surface_->BindToClient(&output_surface_client_)); |
56 | 56 |
57 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); | 57 shared_bitmap_manager_.reset(new TestSharedBitmapManager()); |
58 resource_provider_ = | 58 resource_provider_ = |
59 ResourceProvider::Create( | 59 ResourceProvider::Create( |
60 output_surface_.get(), shared_bitmap_manager_.get(), 0, false, 1) | 60 output_surface_.get(), shared_bitmap_manager_.get(), 0, false, 1, |
| 61 false) |
61 .Pass(); | 62 .Pass(); |
62 resource_pool_ = ResourcePool::Create( | 63 resource_pool_ = ResourcePool::Create( |
63 resource_provider_.get(), GL_TEXTURE_2D, RGBA_8888); | 64 resource_provider_.get(), GL_TEXTURE_2D, RGBA_8888); |
64 tile_manager_.reset( | 65 tile_manager_.reset( |
65 new FakeTileManager(&tile_manager_client_, resource_pool_.get())); | 66 new FakeTileManager(&tile_manager_client_, resource_pool_.get())); |
66 picture_pile_ = FakePicturePileImpl::CreateInfiniteFilledPile(); | 67 picture_pile_ = FakePicturePileImpl::CreateInfiniteFilledPile(); |
67 } | 68 } |
68 | 69 |
69 scoped_refptr<Tile> CreateTile() { | 70 scoped_refptr<Tile> CreateTile() { |
70 return tile_manager_->CreateTile(picture_pile_.get(), | 71 return tile_manager_->CreateTile(picture_pile_.get(), |
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
722 | 723 |
723 set.Clear(); | 724 set.Clear(); |
724 | 725 |
725 PrioritizedTileSet::Iterator empty_it(&set, true); | 726 PrioritizedTileSet::Iterator empty_it(&set, true); |
726 EXPECT_FALSE(empty_it); | 727 EXPECT_FALSE(empty_it); |
727 } | 728 } |
728 | 729 |
729 } // namespace | 730 } // namespace |
730 } // namespace cc | 731 } // namespace cc |
731 | 732 |
OLD | NEW |