| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 | 48 |
| 49 namespace { | 49 namespace { |
| 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_ = ResourceProvider::Create(output_surface_.get(), |
| 59 ResourceProvider::Create( | 59 shared_bitmap_manager_.get(), |
| 60 output_surface_.get(), shared_bitmap_manager_.get(), 0, false, 1, | 60 NULL, |
| 61 false) | 61 0, |
| 62 .Pass(); | 62 false, |
| 63 1, |
| 64 false).Pass(); |
| 63 resource_pool_ = ResourcePool::Create( | 65 resource_pool_ = ResourcePool::Create( |
| 64 resource_provider_.get(), GL_TEXTURE_2D, RGBA_8888); | 66 resource_provider_.get(), GL_TEXTURE_2D, RGBA_8888); |
| 65 tile_manager_.reset( | 67 tile_manager_.reset( |
| 66 new FakeTileManager(&tile_manager_client_, resource_pool_.get())); | 68 new FakeTileManager(&tile_manager_client_, resource_pool_.get())); |
| 67 picture_pile_ = FakePicturePileImpl::CreateInfiniteFilledPile(); | 69 picture_pile_ = FakePicturePileImpl::CreateInfiniteFilledPile(); |
| 68 } | 70 } |
| 69 | 71 |
| 70 scoped_refptr<Tile> CreateTile() { | 72 scoped_refptr<Tile> CreateTile() { |
| 71 return tile_manager_->CreateTile(picture_pile_.get(), | 73 return tile_manager_->CreateTile(picture_pile_.get(), |
| 72 settings_.default_tile_size, | 74 settings_.default_tile_size, |
| (...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 764 | 766 |
| 765 set.Clear(); | 767 set.Clear(); |
| 766 | 768 |
| 767 PrioritizedTileSet::Iterator empty_it(&set, true); | 769 PrioritizedTileSet::Iterator empty_it(&set, true); |
| 768 EXPECT_FALSE(empty_it); | 770 EXPECT_FALSE(empty_it); |
| 769 } | 771 } |
| 770 | 772 |
| 771 } // namespace | 773 } // namespace |
| 772 } // namespace cc | 774 } // namespace cc |
| 773 | 775 |
| OLD | NEW |