| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 void DisplayOutputSurfaceLost() override; | 85 void DisplayOutputSurfaceLost() override; |
| 86 void DisplayWillDrawAndSwap(bool will_draw_and_swap, | 86 void DisplayWillDrawAndSwap(bool will_draw_and_swap, |
| 87 const RenderPassList& render_passes) override; | 87 const RenderPassList& render_passes) override; |
| 88 void DisplayDidDrawAndSwap() override; | 88 void DisplayDidDrawAndSwap() override; |
| 89 | 89 |
| 90 private: | 90 private: |
| 91 void DidDrawCallback(); | 91 void DidDrawCallback(); |
| 92 | 92 |
| 93 const bool synchronous_composite_; | 93 const bool synchronous_composite_; |
| 94 const RendererSettings renderer_settings_; | 94 const RendererSettings renderer_settings_; |
| 95 SharedBitmapManager* const shared_bitmap_manager_; | |
| 96 gpu::GpuMemoryBufferManager* const gpu_memory_buffer_manager_; | |
| 97 | 95 |
| 98 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 96 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 99 | 97 |
| 100 FrameSinkId frame_sink_id_; | 98 FrameSinkId frame_sink_id_; |
| 101 // 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 |
| 102 // CompositorFrameSink is owned/destroyed on the compositor thread. | 100 // CompositorFrameSink is owned/destroyed on the compositor thread. |
| 103 std::unique_ptr<SurfaceManager> surface_manager_; | 101 std::unique_ptr<SurfaceManager> surface_manager_; |
| 104 std::unique_ptr<SurfaceIdAllocator> surface_id_allocator_; | 102 std::unique_ptr<SurfaceIdAllocator> surface_id_allocator_; |
| 105 LocalFrameId delegated_local_frame_id_; | 103 LocalFrameId delegated_local_frame_id_; |
| 106 | 104 |
| 107 // Uses surface_manager_. | 105 // Uses surface_manager_. |
| 108 std::unique_ptr<SurfaceFactory> surface_factory_; | 106 std::unique_ptr<SurfaceFactory> surface_factory_; |
| 109 | 107 |
| 110 // Uses surface_manager_. | 108 // Uses surface_manager_. |
| 111 std::unique_ptr<Display> display_; | 109 std::unique_ptr<Display> display_; |
| 112 | 110 |
| 113 bool bound_ = false; | 111 bool bound_ = false; |
| 114 TestCompositorFrameSinkClient* test_client_ = nullptr; | 112 TestCompositorFrameSinkClient* test_client_ = nullptr; |
| 115 gfx::Size enlarge_pass_texture_amount_; | 113 gfx::Size enlarge_pass_texture_amount_; |
| 116 | 114 |
| 117 std::vector<std::unique_ptr<CopyOutputRequest>> copy_requests_; | 115 std::vector<std::unique_ptr<CopyOutputRequest>> copy_requests_; |
| 118 | 116 |
| 119 base::WeakPtrFactory<TestCompositorFrameSink> weak_ptr_factory_; | 117 base::WeakPtrFactory<TestCompositorFrameSink> weak_ptr_factory_; |
| 120 }; | 118 }; |
| 121 | 119 |
| 122 } // namespace cc | 120 } // namespace cc |
| 123 | 121 |
| 124 #endif // CC_TEST_TEST_COMPOSITOR_FRAME_SINK_H_ | 122 #endif // CC_TEST_TEST_COMPOSITOR_FRAME_SINK_H_ |
| OLD | NEW |