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" |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 const bool disable_display_vsync_; | 105 const bool disable_display_vsync_; |
106 const RendererSettings renderer_settings_; | 106 const RendererSettings renderer_settings_; |
107 | 107 |
108 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 108 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
109 | 109 |
110 FrameSinkId frame_sink_id_; | 110 FrameSinkId frame_sink_id_; |
111 // TODO(danakj): These don't need to be stored in unique_ptrs when | 111 // TODO(danakj): These don't need to be stored in unique_ptrs when |
112 // CompositorFrameSink is owned/destroyed on the compositor thread. | 112 // CompositorFrameSink is owned/destroyed on the compositor thread. |
113 std::unique_ptr<SurfaceManager> surface_manager_; | 113 std::unique_ptr<SurfaceManager> surface_manager_; |
114 std::unique_ptr<LocalSurfaceIdAllocator> local_surface_id_allocator_; | 114 std::unique_ptr<LocalSurfaceIdAllocator> local_surface_id_allocator_; |
115 LocalSurfaceId delegated_local_surface_id_; | 115 LocalSurfaceId local_surface_id_; |
| 116 gfx::Size display_size_; |
| 117 float device_scale_factor_ = 0; |
116 | 118 |
117 // Uses surface_manager_. | 119 // Uses surface_manager_. |
118 std::unique_ptr<CompositorFrameSinkSupport> support_; | 120 std::unique_ptr<CompositorFrameSinkSupport> support_; |
119 | 121 |
120 std::unique_ptr<SyntheticBeginFrameSource> begin_frame_source_; | 122 std::unique_ptr<SyntheticBeginFrameSource> begin_frame_source_; |
121 ExternalBeginFrameSource external_begin_frame_source_; | 123 ExternalBeginFrameSource external_begin_frame_source_; |
122 | 124 |
123 // Uses surface_manager_ and begin_frame_source_. | 125 // Uses surface_manager_ and begin_frame_source_. |
124 std::unique_ptr<Display> display_; | 126 std::unique_ptr<Display> display_; |
125 | 127 |
126 TestCompositorFrameSinkClient* test_client_ = nullptr; | 128 TestCompositorFrameSinkClient* test_client_ = nullptr; |
127 gfx::Size enlarge_pass_texture_amount_; | 129 gfx::Size enlarge_pass_texture_amount_; |
128 | 130 |
129 std::vector<std::unique_ptr<CopyOutputRequest>> copy_requests_; | 131 std::vector<std::unique_ptr<CopyOutputRequest>> copy_requests_; |
130 | 132 |
131 base::WeakPtrFactory<TestCompositorFrameSink> weak_ptr_factory_; | 133 base::WeakPtrFactory<TestCompositorFrameSink> weak_ptr_factory_; |
132 }; | 134 }; |
133 | 135 |
134 } // namespace cc | 136 } // namespace cc |
135 | 137 |
136 #endif // CC_TEST_TEST_COMPOSITOR_FRAME_SINK_H_ | 138 #endif // CC_TEST_TEST_COMPOSITOR_FRAME_SINK_H_ |
OLD | NEW |