| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef CC_TEST_TEST_COMPOSITOR_FRAME_SINK_H_ | 5 #ifndef CC_TEST_TEST_COMPOSITOR_FRAME_SINK_H_ |
| 6 #define CC_TEST_TEST_COMPOSITOR_FRAME_SINK_H_ | 6 #define CC_TEST_TEST_COMPOSITOR_FRAME_SINK_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "cc/output/compositor_frame_sink.h" | 10 #include "cc/output/compositor_frame_sink.h" |
| 11 #include "cc/output/renderer_settings.h" | 11 #include "cc/output/renderer_settings.h" |
| 12 #include "cc/scheduler/begin_frame_source.h" | 12 #include "cc/scheduler/begin_frame_source.h" |
| 13 #include "cc/surfaces/display.h" | 13 #include "cc/surfaces/display.h" |
| 14 #include "cc/surfaces/display_client.h" | 14 #include "cc/surfaces/display_client.h" |
| 15 #include "cc/surfaces/local_surface_id_allocator.h" |
| 15 #include "cc/surfaces/surface_factory.h" | 16 #include "cc/surfaces/surface_factory.h" |
| 16 #include "cc/surfaces/surface_factory_client.h" | 17 #include "cc/surfaces/surface_factory_client.h" |
| 17 #include "cc/surfaces/surface_id_allocator.h" | |
| 18 #include "cc/surfaces/surface_manager.h" | 18 #include "cc/surfaces/surface_manager.h" |
| 19 | 19 |
| 20 namespace base { | 20 namespace base { |
| 21 class SingleThreadTaskRunner; | 21 class SingleThreadTaskRunner; |
| 22 } | 22 } |
| 23 | 23 |
| 24 namespace cc { | 24 namespace cc { |
| 25 class CopyOutputRequest; | 25 class CopyOutputRequest; |
| 26 class OutputSurface; | 26 class OutputSurface; |
| 27 | 27 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 | 92 |
| 93 const bool synchronous_composite_; | 93 const bool synchronous_composite_; |
| 94 const RendererSettings renderer_settings_; | 94 const RendererSettings renderer_settings_; |
| 95 | 95 |
| 96 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 96 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 97 | 97 |
| 98 FrameSinkId frame_sink_id_; | 98 FrameSinkId frame_sink_id_; |
| 99 // TODO(danakj): These don't need to be stored in unique_ptrs when | 99 // TODO(danakj): These don't need to be stored in unique_ptrs when |
| 100 // CompositorFrameSink is owned/destroyed on the compositor thread. | 100 // CompositorFrameSink is owned/destroyed on the compositor thread. |
| 101 std::unique_ptr<SurfaceManager> surface_manager_; | 101 std::unique_ptr<SurfaceManager> surface_manager_; |
| 102 std::unique_ptr<SurfaceIdAllocator> surface_id_allocator_; | 102 std::unique_ptr<LocalSurfaceIdAllocator> local_surface_id_allocator_; |
| 103 LocalSurfaceId delegated_local_surface_id_; | 103 LocalSurfaceId delegated_local_surface_id_; |
| 104 | 104 |
| 105 // Uses surface_manager_. | 105 // Uses surface_manager_. |
| 106 std::unique_ptr<SurfaceFactory> surface_factory_; | 106 std::unique_ptr<SurfaceFactory> surface_factory_; |
| 107 | 107 |
| 108 std::unique_ptr<SyntheticBeginFrameSource> begin_frame_source_; | 108 std::unique_ptr<SyntheticBeginFrameSource> begin_frame_source_; |
| 109 | 109 |
| 110 // Uses surface_manager_ and begin_frame_source_. | 110 // Uses surface_manager_ and begin_frame_source_. |
| 111 std::unique_ptr<Display> display_; | 111 std::unique_ptr<Display> display_; |
| 112 | 112 |
| 113 bool bound_ = false; | 113 bool bound_ = false; |
| 114 TestCompositorFrameSinkClient* test_client_ = nullptr; | 114 TestCompositorFrameSinkClient* test_client_ = nullptr; |
| 115 gfx::Size enlarge_pass_texture_amount_; | 115 gfx::Size enlarge_pass_texture_amount_; |
| 116 | 116 |
| 117 std::vector<std::unique_ptr<CopyOutputRequest>> copy_requests_; | 117 std::vector<std::unique_ptr<CopyOutputRequest>> copy_requests_; |
| 118 | 118 |
| 119 base::WeakPtrFactory<TestCompositorFrameSink> weak_ptr_factory_; | 119 base::WeakPtrFactory<TestCompositorFrameSink> weak_ptr_factory_; |
| 120 }; | 120 }; |
| 121 | 121 |
| 122 } // namespace cc | 122 } // namespace cc |
| 123 | 123 |
| 124 #endif // CC_TEST_TEST_COMPOSITOR_FRAME_SINK_H_ | 124 #endif // CC_TEST_TEST_COMPOSITOR_FRAME_SINK_H_ |
| OLD | NEW |