| 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/quads/render_pass.h" | 6 #include "cc/quads/render_pass.h" |
| 7 #include "cc/quads/solid_color_draw_quad.h" | 7 #include "cc/quads/solid_color_draw_quad.h" |
| 8 #include "cc/quads/surface_draw_quad.h" | 8 #include "cc/quads/surface_draw_quad.h" |
| 9 #include "cc/surfaces/surface.h" | 9 #include "cc/surfaces/surface.h" |
| 10 #include "cc/surfaces/surface_aggregator.h" | 10 #include "cc/surfaces/surface_aggregator.h" |
| 11 #include "cc/surfaces/surface_factory.h" | 11 #include "cc/surfaces/surface_factory.h" |
| 12 #include "cc/surfaces/surface_factory_client.h" | 12 #include "cc/surfaces/surface_factory_client.h" |
| 13 #include "cc/surfaces/surface_id_allocator.h" | 13 #include "cc/surfaces/surface_id_allocator.h" |
| 14 #include "cc/surfaces/surface_manager.h" | 14 #include "cc/surfaces/surface_manager.h" |
| 15 #include "cc/test/pixel_comparator.h" | 15 #include "cc/test/pixel_comparator.h" |
| 16 #include "cc/test/pixel_test.h" | 16 #include "cc/test/pixel_test.h" |
| 17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
| 18 | 18 |
| 19 #if !defined(OS_ANDROID) | 19 #if !defined(OS_ANDROID) |
| 20 | 20 |
| 21 namespace cc { | 21 namespace cc { |
| 22 namespace { | 22 namespace { |
| 23 | 23 |
| 24 static constexpr uint32_t kArbitraryClientId = 1u; |
| 25 |
| 24 class EmptySurfaceFactoryClient : public SurfaceFactoryClient { | 26 class EmptySurfaceFactoryClient : public SurfaceFactoryClient { |
| 25 public: | 27 public: |
| 26 void ReturnResources(const ReturnedResourceArray& resources) override {} | 28 void ReturnResources(const ReturnedResourceArray& resources) override {} |
| 27 void SetBeginFrameSource(BeginFrameSource* begin_frame_source) override {} | 29 void SetBeginFrameSource(BeginFrameSource* begin_frame_source) override {} |
| 28 }; | 30 }; |
| 29 | 31 |
| 30 class SurfacesPixelTest : public RendererPixelTest<GLRenderer> { | 32 class SurfacesPixelTest : public RendererPixelTest<GLRenderer> { |
| 31 public: | 33 public: |
| 32 SurfacesPixelTest() : allocator_(1u), factory_(&manager_, &client_) {} | 34 SurfacesPixelTest() |
| 35 : allocator_(kArbitraryClientId), factory_(&manager_, &client_) {} |
| 33 | 36 |
| 34 protected: | 37 protected: |
| 35 SurfaceManager manager_; | 38 SurfaceManager manager_; |
| 36 SurfaceIdAllocator allocator_; | 39 SurfaceIdAllocator allocator_; |
| 37 EmptySurfaceFactoryClient client_; | 40 EmptySurfaceFactoryClient client_; |
| 38 SurfaceFactory factory_; | 41 SurfaceFactory factory_; |
| 39 }; | 42 }; |
| 40 | 43 |
| 41 SharedQuadState* CreateAndAppendTestSharedQuadState( | 44 SharedQuadState* CreateAndAppendTestSharedQuadState( |
| 42 RenderPass* render_pass, | 45 RenderPass* render_pass, |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 | 332 |
| 330 factory_.Destroy(root_surface_id); | 333 factory_.Destroy(root_surface_id); |
| 331 factory_.Destroy(left_child_id); | 334 factory_.Destroy(left_child_id); |
| 332 factory_.Destroy(right_child_id); | 335 factory_.Destroy(right_child_id); |
| 333 } | 336 } |
| 334 | 337 |
| 335 } // namespace | 338 } // namespace |
| 336 } // namespace cc | 339 } // namespace cc |
| 337 | 340 |
| 338 #endif // !defined(OS_ANDROID) | 341 #endif // !defined(OS_ANDROID) |
| OLD | NEW |