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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 // to a fixed thread when BindToClient is called. | 64 // to a fixed thread when BindToClient is called. |
65 class SynchronousCompositorOutputSurface | 65 class SynchronousCompositorOutputSurface |
66 : NON_EXPORTED_BASE(public cc::OutputSurface), | 66 : NON_EXPORTED_BASE(public cc::OutputSurface), |
67 public cc::SurfaceFactoryClient { | 67 public cc::SurfaceFactoryClient { |
68 public: | 68 public: |
69 SynchronousCompositorOutputSurface( | 69 SynchronousCompositorOutputSurface( |
70 scoped_refptr<cc::ContextProvider> context_provider, | 70 scoped_refptr<cc::ContextProvider> context_provider, |
71 scoped_refptr<cc::ContextProvider> worker_context_provider, | 71 scoped_refptr<cc::ContextProvider> worker_context_provider, |
72 int routing_id, | 72 int routing_id, |
73 uint32_t output_surface_id, | 73 uint32_t output_surface_id, |
| 74 std::unique_ptr<cc::BeginFrameSource> begin_frame_source, |
74 SynchronousCompositorRegistry* registry, | 75 SynchronousCompositorRegistry* registry, |
75 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue); | 76 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue); |
76 ~SynchronousCompositorOutputSurface() override; | 77 ~SynchronousCompositorOutputSurface() override; |
77 | 78 |
78 void SetSyncClient(SynchronousCompositorOutputSurfaceClient* compositor); | 79 void SetSyncClient(SynchronousCompositorOutputSurfaceClient* compositor); |
79 bool OnMessageReceived(const IPC::Message& message); | 80 bool OnMessageReceived(const IPC::Message& message); |
80 | 81 |
81 // OutputSurface. | 82 // OutputSurface. |
82 bool BindToClient(cc::OutputSurfaceClient* surface_client) override; | 83 bool BindToClient(cc::OutputSurfaceClient* surface_client) override; |
83 void DetachFromClient() override; | 84 void DetachFromClient() override; |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 std::unique_ptr<cc::SurfaceManager> surface_manager_; | 155 std::unique_ptr<cc::SurfaceManager> surface_manager_; |
155 std::unique_ptr<cc::SurfaceIdAllocator> surface_id_allocator_; | 156 std::unique_ptr<cc::SurfaceIdAllocator> surface_id_allocator_; |
156 cc::SurfaceId delegated_surface_id_; | 157 cc::SurfaceId delegated_surface_id_; |
157 // Uses surface_manager_. | 158 // Uses surface_manager_. |
158 std::unique_ptr<cc::SurfaceFactory> surface_factory_; | 159 std::unique_ptr<cc::SurfaceFactory> surface_factory_; |
159 StubDisplayClient display_client_; | 160 StubDisplayClient display_client_; |
160 // Uses surface_manager_. | 161 // Uses surface_manager_. |
161 std::unique_ptr<cc::Display> display_; | 162 std::unique_ptr<cc::Display> display_; |
162 // Owned by |display_|. | 163 // Owned by |display_|. |
163 SoftwareOutputSurface* software_output_surface_ = nullptr; | 164 SoftwareOutputSurface* software_output_surface_ = nullptr; |
| 165 std::unique_ptr<cc::BeginFrameSource> begin_frame_source_; |
164 | 166 |
165 base::ThreadChecker thread_checker_; | 167 base::ThreadChecker thread_checker_; |
166 | 168 |
167 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface); | 169 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface); |
168 }; | 170 }; |
169 | 171 |
170 } // namespace content | 172 } // namespace content |
171 | 173 |
172 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE_H_ | 174 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE_H_ |
OLD | NEW |