| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/output/compositor_frame.h" | 5 #include "cc/output/compositor_frame.h" |
| 6 #include "cc/output/delegated_frame_data.h" | 6 #include "cc/output/delegated_frame_data.h" |
| 7 #include "cc/quads/render_pass.h" | 7 #include "cc/quads/render_pass.h" |
| 8 #include "cc/quads/render_pass_draw_quad.h" | 8 #include "cc/quads/render_pass_draw_quad.h" |
| 9 #include "cc/quads/solid_color_draw_quad.h" | 9 #include "cc/quads/solid_color_draw_quad.h" |
| 10 #include "cc/quads/surface_draw_quad.h" | 10 #include "cc/quads/surface_draw_quad.h" |
| (...skipping 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1219 } | 1219 } |
| 1220 | 1220 |
| 1221 class SurfaceAggregatorWithResourcesTest : public testing::Test { | 1221 class SurfaceAggregatorWithResourcesTest : public testing::Test { |
| 1222 public: | 1222 public: |
| 1223 void SetUp() override { | 1223 void SetUp() override { |
| 1224 output_surface_ = FakeOutputSurface::CreateSoftware( | 1224 output_surface_ = FakeOutputSurface::CreateSoftware( |
| 1225 make_scoped_ptr(new SoftwareOutputDevice)); | 1225 make_scoped_ptr(new SoftwareOutputDevice)); |
| 1226 output_surface_->BindToClient(&output_surface_client_); | 1226 output_surface_->BindToClient(&output_surface_client_); |
| 1227 shared_bitmap_manager_.reset(new TestSharedBitmapManager); | 1227 shared_bitmap_manager_.reset(new TestSharedBitmapManager); |
| 1228 | 1228 |
| 1229 resource_provider_ = ResourceProvider::Create(output_surface_.get(), | 1229 resource_provider_ = ResourceProvider::Create( |
| 1230 shared_bitmap_manager_.get(), | 1230 output_surface_.get(), shared_bitmap_manager_.get(), NULL, NULL, 0, |
| 1231 NULL, | 1231 false, false, 1); |
| 1232 NULL, | |
| 1233 0, | |
| 1234 false, | |
| 1235 1); | |
| 1236 | 1232 |
| 1237 aggregator_.reset( | 1233 aggregator_.reset( |
| 1238 new SurfaceAggregator(&manager_, resource_provider_.get())); | 1234 new SurfaceAggregator(&manager_, resource_provider_.get())); |
| 1239 } | 1235 } |
| 1240 | 1236 |
| 1241 protected: | 1237 protected: |
| 1242 SurfaceManager manager_; | 1238 SurfaceManager manager_; |
| 1243 FakeOutputSurfaceClient output_surface_client_; | 1239 FakeOutputSurfaceClient output_surface_client_; |
| 1244 scoped_ptr<OutputSurface> output_surface_; | 1240 scoped_ptr<OutputSurface> output_surface_; |
| 1245 scoped_ptr<SharedBitmapManager> shared_bitmap_manager_; | 1241 scoped_ptr<SharedBitmapManager> shared_bitmap_manager_; |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1406 EXPECT_THAT(returned_ids, | 1402 EXPECT_THAT(returned_ids, |
| 1407 testing::WhenSorted(testing::ElementsAreArray(ids))); | 1403 testing::WhenSorted(testing::ElementsAreArray(ids))); |
| 1408 EXPECT_EQ(3u, resource_provider_->num_resources()); | 1404 EXPECT_EQ(3u, resource_provider_->num_resources()); |
| 1409 factory.Destroy(surface_id); | 1405 factory.Destroy(surface_id); |
| 1410 factory.Destroy(surface_id2); | 1406 factory.Destroy(surface_id2); |
| 1411 } | 1407 } |
| 1412 | 1408 |
| 1413 } // namespace | 1409 } // namespace |
| 1414 } // namespace cc | 1410 } // namespace cc |
| 1415 | 1411 |
| OLD | NEW |