| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE_H_ | 5 #ifndef CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE_H_ |
| 6 #define CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE_H_ | 6 #define CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 bool in_software_draw_ = false; | 134 bool in_software_draw_ = false; |
| 135 bool did_swap_ = false; | 135 bool did_swap_ = false; |
| 136 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue_; | 136 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue_; |
| 137 | 137 |
| 138 base::CancelableClosure fallback_tick_; | 138 base::CancelableClosure fallback_tick_; |
| 139 bool fallback_tick_pending_ = false; | 139 bool fallback_tick_pending_ = false; |
| 140 bool fallback_tick_running_ = false; | 140 bool fallback_tick_running_ = false; |
| 141 | 141 |
| 142 class StubDisplayClient : public cc::DisplayClient { | 142 class StubDisplayClient : public cc::DisplayClient { |
| 143 void DisplayOutputSurfaceLost() override {} | 143 void DisplayOutputSurfaceLost() override {} |
| 144 void DisplaySetMemoryPolicy( | |
| 145 const cc::ManagedMemoryPolicy& policy) override {} | |
| 146 void DisplayWillDrawAndSwap( | 144 void DisplayWillDrawAndSwap( |
| 147 bool will_draw_and_swap, | 145 bool will_draw_and_swap, |
| 148 const cc::RenderPassList& render_passes) override {} | 146 const cc::RenderPassList& render_passes) override {} |
| 149 void DisplayDidDrawAndSwap() override {} | 147 void DisplayDidDrawAndSwap() override {} |
| 150 }; | 148 }; |
| 151 | 149 |
| 152 // TODO(danakj): These don't to be stored in unique_ptrs when OutputSurface | 150 // TODO(danakj): These don't to be stored in unique_ptrs when OutputSurface |
| 153 // is owned/destroyed on the compositor thread. | 151 // is owned/destroyed on the compositor thread. |
| 154 std::unique_ptr<cc::SurfaceManager> surface_manager_; | 152 std::unique_ptr<cc::SurfaceManager> surface_manager_; |
| 155 std::unique_ptr<cc::SurfaceIdAllocator> surface_id_allocator_; | 153 std::unique_ptr<cc::SurfaceIdAllocator> surface_id_allocator_; |
| 156 cc::SurfaceId delegated_surface_id_; | 154 cc::SurfaceId delegated_surface_id_; |
| 157 // Uses surface_manager_. | 155 // Uses surface_manager_. |
| 158 std::unique_ptr<cc::SurfaceFactory> surface_factory_; | 156 std::unique_ptr<cc::SurfaceFactory> surface_factory_; |
| 159 StubDisplayClient display_client_; | 157 StubDisplayClient display_client_; |
| 160 // Uses surface_manager_. | 158 // Uses surface_manager_. |
| 161 std::unique_ptr<cc::Display> display_; | 159 std::unique_ptr<cc::Display> display_; |
| 162 // Owned by |display_|. | 160 // Owned by |display_|. |
| 163 SoftwareOutputSurface* software_output_surface_ = nullptr; | 161 SoftwareOutputSurface* software_output_surface_ = nullptr; |
| 164 | 162 |
| 165 base::ThreadChecker thread_checker_; | 163 base::ThreadChecker thread_checker_; |
| 166 | 164 |
| 167 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface); | 165 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface); |
| 168 }; | 166 }; |
| 169 | 167 |
| 170 } // namespace content | 168 } // namespace content |
| 171 | 169 |
| 172 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE_H_ | 170 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE_H_ |
| OLD | NEW |