| 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_FRAME_SINK_H_ | 5 #ifndef CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_FRAME_SINK_H_ |
| 6 #define CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_FRAME_SINK_H_ | 6 #define CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_FRAME_SINK_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 // |delegate_|) which represent the consumers of the two roles in plays. | 64 // |delegate_|) which represent the consumers of the two roles in plays. |
| 65 // This class can be created only on the main thread, but then becomes pinned | 65 // This class can be created only on the main thread, but then becomes pinned |
| 66 // to a fixed thread when BindToClient is called. | 66 // to a fixed thread when BindToClient is called. |
| 67 class SynchronousCompositorFrameSink | 67 class SynchronousCompositorFrameSink |
| 68 : NON_EXPORTED_BASE(public cc::CompositorFrameSink), | 68 : NON_EXPORTED_BASE(public cc::CompositorFrameSink), |
| 69 public cc::SurfaceFactoryClient { | 69 public cc::SurfaceFactoryClient { |
| 70 public: | 70 public: |
| 71 SynchronousCompositorFrameSink( | 71 SynchronousCompositorFrameSink( |
| 72 scoped_refptr<cc::ContextProvider> context_provider, | 72 scoped_refptr<cc::ContextProvider> context_provider, |
| 73 scoped_refptr<cc::ContextProvider> worker_context_provider, | 73 scoped_refptr<cc::ContextProvider> worker_context_provider, |
| 74 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, |
| 75 cc::SharedBitmapManager* shared_bitmap_manager, |
| 74 int routing_id, | 76 int routing_id, |
| 75 uint32_t compositor_frame_sink_id, | 77 uint32_t compositor_frame_sink_id, |
| 76 std::unique_ptr<cc::BeginFrameSource> begin_frame_source, | 78 std::unique_ptr<cc::BeginFrameSource> begin_frame_source, |
| 77 SynchronousCompositorRegistry* registry, | 79 SynchronousCompositorRegistry* registry, |
| 78 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue); | 80 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue); |
| 79 ~SynchronousCompositorFrameSink() override; | 81 ~SynchronousCompositorFrameSink() override; |
| 80 | 82 |
| 81 void SetSyncClient(SynchronousCompositorFrameSinkClient* compositor); | 83 void SetSyncClient(SynchronousCompositorFrameSinkClient* compositor); |
| 82 bool OnMessageReceived(const IPC::Message& message); | 84 bool OnMessageReceived(const IPC::Message& message); |
| 83 | 85 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 gfx::Rect sw_viewport_for_current_draw_; | 163 gfx::Rect sw_viewport_for_current_draw_; |
| 162 | 164 |
| 163 base::ThreadChecker thread_checker_; | 165 base::ThreadChecker thread_checker_; |
| 164 | 166 |
| 165 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorFrameSink); | 167 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorFrameSink); |
| 166 }; | 168 }; |
| 167 | 169 |
| 168 } // namespace content | 170 } // namespace content |
| 169 | 171 |
| 170 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_FRAME_SINK_H_ | 172 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_FRAME_SINK_H_ |
| OLD | NEW |