| 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_FACTORY_H_ | 5 #ifndef CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_FACTORY_H_ |
| 6 #define CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_FACTORY_H_ | 6 #define CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_FACTORY_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 |
| 8 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 #include "gpu/config/gpu_info.h" | 11 #include "gpu/config/gpu_info.h" |
| 11 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" | 12 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" |
| 12 | 13 |
| 13 namespace base { | 14 namespace base { |
| 14 class SingleThreadTaskRunner; | 15 class SingleThreadTaskRunner; |
| 15 } | 16 } |
| 16 | 17 |
| 17 namespace cc { | 18 namespace cc { |
| 18 class BeginFrameSource; | 19 class BeginFrameSource; |
| 19 class ContextProvider; | 20 class ContextProvider; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 41 // this will be injected from the logical 'browser' side code. | 42 // this will be injected from the logical 'browser' side code. |
| 42 class SynchronousCompositorFactory { | 43 class SynchronousCompositorFactory { |
| 43 public: | 44 public: |
| 44 // Must only be called once, e.g. on startup. Ownership of |instance| remains | 45 // Must only be called once, e.g. on startup. Ownership of |instance| remains |
| 45 // with the caller. | 46 // with the caller. |
| 46 static void SetInstance(SynchronousCompositorFactory* instance); | 47 static void SetInstance(SynchronousCompositorFactory* instance); |
| 47 static SynchronousCompositorFactory* GetInstance(); | 48 static SynchronousCompositorFactory* GetInstance(); |
| 48 | 49 |
| 49 virtual scoped_refptr<base::SingleThreadTaskRunner> | 50 virtual scoped_refptr<base::SingleThreadTaskRunner> |
| 50 GetCompositorTaskRunner() = 0; | 51 GetCompositorTaskRunner() = 0; |
| 51 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface( | 52 virtual std::unique_ptr<cc::OutputSurface> CreateOutputSurface( |
| 52 int routing_id, | 53 int routing_id, |
| 53 uint32_t output_surface_id, | 54 uint32_t output_surface_id, |
| 54 const scoped_refptr<FrameSwapMessageQueue>& frame_swap_message_queue, | 55 const scoped_refptr<FrameSwapMessageQueue>& frame_swap_message_queue, |
| 55 const scoped_refptr<cc::ContextProvider>& onscreen_context, | 56 const scoped_refptr<cc::ContextProvider>& onscreen_context, |
| 56 const scoped_refptr<cc::ContextProvider>& worker_context) = 0; | 57 const scoped_refptr<cc::ContextProvider>& worker_context) = 0; |
| 57 | 58 |
| 58 // The factory maintains ownership of the returned interface. | 59 // The factory maintains ownership of the returned interface. |
| 59 virtual InputHandlerManagerClient* GetInputHandlerManagerClient() = 0; | 60 virtual InputHandlerManagerClient* GetInputHandlerManagerClient() = 0; |
| 60 virtual SynchronousInputHandlerProxyClient* | 61 virtual SynchronousInputHandlerProxyClient* |
| 61 GetSynchronousInputHandlerProxyClient() = 0; | 62 GetSynchronousInputHandlerProxyClient() = 0; |
| 62 | 63 |
| 63 virtual scoped_ptr<cc::BeginFrameSource> CreateExternalBeginFrameSource( | 64 virtual std::unique_ptr<cc::BeginFrameSource> CreateExternalBeginFrameSource( |
| 64 int routing_id) = 0; | 65 int routing_id) = 0; |
| 65 | 66 |
| 66 protected: | 67 protected: |
| 67 SynchronousCompositorFactory() {} | 68 SynchronousCompositorFactory() {} |
| 68 virtual ~SynchronousCompositorFactory() {} | 69 virtual ~SynchronousCompositorFactory() {} |
| 69 }; | 70 }; |
| 70 | 71 |
| 71 } // namespace content | 72 } // namespace content |
| 72 | 73 |
| 73 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_FACTORY_H_ | 74 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_FACTORY_H_ |
| OLD | NEW |