| 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_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE
_H_ | 5 #ifndef CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE
_H_ |
| 6 #define CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE
_H_ | 6 #define CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE
_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 // 'client' pointers (|client_| in the OutputSurface baseclass and | 43 // 'client' pointers (|client_| in the OutputSurface baseclass and |
| 44 // |delegate_|) which represent the consumers of the two roles in plays. | 44 // |delegate_|) which represent the consumers of the two roles in plays. |
| 45 // This class can be created only on the main thread, but then becomes pinned | 45 // This class can be created only on the main thread, but then becomes pinned |
| 46 // to a fixed thread when BindToClient is called. | 46 // to a fixed thread when BindToClient is called. |
| 47 class SynchronousCompositorOutputSurface | 47 class SynchronousCompositorOutputSurface |
| 48 : NON_EXPORTED_BASE(public cc::OutputSurface) { | 48 : NON_EXPORTED_BASE(public cc::OutputSurface) { |
| 49 public: | 49 public: |
| 50 explicit SynchronousCompositorOutputSurface( | 50 explicit SynchronousCompositorOutputSurface( |
| 51 int routing_id, | 51 int routing_id, |
| 52 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue); | 52 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue); |
| 53 virtual ~SynchronousCompositorOutputSurface(); | 53 ~SynchronousCompositorOutputSurface() override; |
| 54 | 54 |
| 55 // OutputSurface. | 55 // OutputSurface. |
| 56 virtual bool BindToClient(cc::OutputSurfaceClient* surface_client) override; | 56 bool BindToClient(cc::OutputSurfaceClient* surface_client) override; |
| 57 virtual void Reshape(const gfx::Size& size, float scale_factor) override; | 57 void Reshape(const gfx::Size& size, float scale_factor) override; |
| 58 virtual void SwapBuffers(cc::CompositorFrame* frame) override; | 58 void SwapBuffers(cc::CompositorFrame* frame) override; |
| 59 | 59 |
| 60 void SetBeginFrameSource( | 60 void SetBeginFrameSource( |
| 61 SynchronousCompositorExternalBeginFrameSource* begin_frame_source); | 61 SynchronousCompositorExternalBeginFrameSource* begin_frame_source); |
| 62 | 62 |
| 63 // Partial SynchronousCompositor API implementation. | 63 // Partial SynchronousCompositor API implementation. |
| 64 bool InitializeHwDraw( | 64 bool InitializeHwDraw( |
| 65 scoped_refptr<cc::ContextProvider> onscreen_context_provider); | 65 scoped_refptr<cc::ContextProvider> onscreen_context_provider); |
| 66 void ReleaseHwDraw(); | 66 void ReleaseHwDraw(); |
| 67 scoped_ptr<cc::CompositorFrame> DemandDrawHw( | 67 scoped_ptr<cc::CompositorFrame> DemandDrawHw( |
| 68 gfx::Size surface_size, | 68 gfx::Size surface_size, |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue_; | 109 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue_; |
| 110 | 110 |
| 111 SynchronousCompositorExternalBeginFrameSource* begin_frame_source_; | 111 SynchronousCompositorExternalBeginFrameSource* begin_frame_source_; |
| 112 | 112 |
| 113 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface); | 113 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface); |
| 114 }; | 114 }; |
| 115 | 115 |
| 116 } // namespace content | 116 } // namespace content |
| 117 | 117 |
| 118 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURF
ACE_H_ | 118 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURF
ACE_H_ |
| OLD | NEW |