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 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1204 } | 1204 } |
1205 | 1205 |
1206 class SurfaceAggregatorWithResourcesTest : public testing::Test { | 1206 class SurfaceAggregatorWithResourcesTest : public testing::Test { |
1207 public: | 1207 public: |
1208 virtual void SetUp() { | 1208 virtual void SetUp() { |
1209 output_surface_ = FakeOutputSurface::CreateSoftware( | 1209 output_surface_ = FakeOutputSurface::CreateSoftware( |
1210 make_scoped_ptr(new SoftwareOutputDevice)); | 1210 make_scoped_ptr(new SoftwareOutputDevice)); |
1211 output_surface_->BindToClient(&output_surface_client_); | 1211 output_surface_->BindToClient(&output_surface_client_); |
1212 shared_bitmap_manager_.reset(new TestSharedBitmapManager); | 1212 shared_bitmap_manager_.reset(new TestSharedBitmapManager); |
1213 | 1213 |
1214 resource_provider_ = ResourceProvider::Create(output_surface_.get(), | 1214 resource_provider_ = ResourceProvider::Create( |
1215 shared_bitmap_manager_.get(), | 1215 output_surface_.get(), shared_bitmap_manager_.get(), NULL, NULL, 0, |
1216 NULL, | 1216 false, false, 1); |
1217 NULL, | |
1218 0, | |
1219 false, | |
1220 1); | |
1221 | 1217 |
1222 aggregator_.reset( | 1218 aggregator_.reset( |
1223 new SurfaceAggregator(&manager_, resource_provider_.get())); | 1219 new SurfaceAggregator(&manager_, resource_provider_.get())); |
1224 } | 1220 } |
1225 | 1221 |
1226 protected: | 1222 protected: |
1227 SurfaceManager manager_; | 1223 SurfaceManager manager_; |
1228 FakeOutputSurfaceClient output_surface_client_; | 1224 FakeOutputSurfaceClient output_surface_client_; |
1229 scoped_ptr<OutputSurface> output_surface_; | 1225 scoped_ptr<OutputSurface> output_surface_; |
1230 scoped_ptr<SharedBitmapManager> shared_bitmap_manager_; | 1226 scoped_ptr<SharedBitmapManager> shared_bitmap_manager_; |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1357 EXPECT_THAT(returned_ids, | 1353 EXPECT_THAT(returned_ids, |
1358 testing::WhenSorted(testing::ElementsAreArray(ids))); | 1354 testing::WhenSorted(testing::ElementsAreArray(ids))); |
1359 EXPECT_EQ(3u, resource_provider_->num_resources()); | 1355 EXPECT_EQ(3u, resource_provider_->num_resources()); |
1360 factory.Destroy(surface_id); | 1356 factory.Destroy(surface_id); |
1361 factory.Destroy(surface_id2); | 1357 factory.Destroy(surface_id2); |
1362 } | 1358 } |
1363 | 1359 |
1364 } // namespace | 1360 } // namespace |
1365 } // namespace cc | 1361 } // namespace cc |
1366 | 1362 |
OLD | NEW |