| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 // of control" - enabling drawing to be orchestrated by the embedding | 53 // of control" - enabling drawing to be orchestrated by the embedding |
| 54 // layer, instead of driven by the compositor internals - hence it holds two | 54 // layer, instead of driven by the compositor internals - hence it holds two |
| 55 // 'client' pointers (|client_| in the OutputSurface baseclass and | 55 // 'client' pointers (|client_| in the OutputSurface baseclass and |
| 56 // |delegate_|) which represent the consumers of the two roles in plays. | 56 // |delegate_|) which represent the consumers of the two roles in plays. |
| 57 // This class can be created only on the main thread, but then becomes pinned | 57 // This class can be created only on the main thread, but then becomes pinned |
| 58 // to a fixed thread when BindToClient is called. | 58 // to a fixed thread when BindToClient is called. |
| 59 class SynchronousCompositorOutputSurface | 59 class SynchronousCompositorOutputSurface |
| 60 : NON_EXPORTED_BASE(public cc::OutputSurface) { | 60 : NON_EXPORTED_BASE(public cc::OutputSurface) { |
| 61 public: | 61 public: |
| 62 SynchronousCompositorOutputSurface( | 62 SynchronousCompositorOutputSurface( |
| 63 const scoped_refptr<cc::ContextProvider>& context_provider, | 63 scoped_refptr<cc::ContextProvider> context_provider, |
| 64 const scoped_refptr<cc::ContextProvider>& worker_context_provider, | 64 scoped_refptr<cc::ContextProvider> worker_context_provider, |
| 65 int routing_id, | 65 int routing_id, |
| 66 uint32_t output_surface_id, | 66 uint32_t output_surface_id, |
| 67 SynchronousCompositorRegistry* registry, | 67 SynchronousCompositorRegistry* registry, |
| 68 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue); | 68 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue); |
| 69 ~SynchronousCompositorOutputSurface() override; | 69 ~SynchronousCompositorOutputSurface() override; |
| 70 | 70 |
| 71 void SetSyncClient(SynchronousCompositorOutputSurfaceClient* compositor); | 71 void SetSyncClient(SynchronousCompositorOutputSurfaceClient* compositor); |
| 72 bool OnMessageReceived(const IPC::Message& message); | 72 bool OnMessageReceived(const IPC::Message& message); |
| 73 | 73 |
| 74 // OutputSurface. | 74 // OutputSurface. |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 bool fallback_tick_running_; | 131 bool fallback_tick_running_; |
| 132 | 132 |
| 133 base::ThreadChecker thread_checker_; | 133 base::ThreadChecker thread_checker_; |
| 134 | 134 |
| 135 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface); | 135 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface); |
| 136 }; | 136 }; |
| 137 | 137 |
| 138 } // namespace content | 138 } // namespace content |
| 139 | 139 |
| 140 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE_H_ | 140 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE_H_ |
| OLD | NEW |