| 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 "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "gpu/config/gpu_info.h" | 10 #include "gpu/config/gpu_info.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 public: | 42 public: |
| 43 // Must only be called once, e.g. on startup. Ownership of |instance| remains | 43 // Must only be called once, e.g. on startup. Ownership of |instance| remains |
| 44 // with the caller. | 44 // with the caller. |
| 45 static void SetInstance(SynchronousCompositorFactory* instance); | 45 static void SetInstance(SynchronousCompositorFactory* instance); |
| 46 static SynchronousCompositorFactory* GetInstance(); | 46 static SynchronousCompositorFactory* GetInstance(); |
| 47 | 47 |
| 48 virtual scoped_refptr<base::SingleThreadTaskRunner> | 48 virtual scoped_refptr<base::SingleThreadTaskRunner> |
| 49 GetCompositorTaskRunner() = 0; | 49 GetCompositorTaskRunner() = 0; |
| 50 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface( | 50 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface( |
| 51 int routing_id, | 51 int routing_id, |
| 52 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue) = 0; | 52 const scoped_refptr<FrameSwapMessageQueue>& frame_swap_message_queue, |
| 53 const scoped_refptr<cc::ContextProvider>& onscreen_context, |
| 54 const scoped_refptr<cc::ContextProvider>& worker_context) = 0; |
| 53 | 55 |
| 54 // The factory maintains ownership of the returned interface. | 56 // The factory maintains ownership of the returned interface. |
| 55 virtual InputHandlerManagerClient* GetInputHandlerManagerClient() = 0; | 57 virtual InputHandlerManagerClient* GetInputHandlerManagerClient() = 0; |
| 56 | 58 |
| 57 virtual scoped_ptr<cc::BeginFrameSource> CreateExternalBeginFrameSource( | 59 virtual scoped_ptr<cc::BeginFrameSource> CreateExternalBeginFrameSource( |
| 58 int routing_id) = 0; | 60 int routing_id) = 0; |
| 59 virtual scoped_refptr<StreamTextureFactory> CreateStreamTextureFactory( | 61 virtual scoped_refptr<StreamTextureFactory> CreateStreamTextureFactory( |
| 60 int frame_id) = 0; | 62 int frame_id) = 0; |
| 61 | 63 |
| 62 protected: | 64 protected: |
| 63 SynchronousCompositorFactory() {} | 65 SynchronousCompositorFactory() {} |
| 64 virtual ~SynchronousCompositorFactory() {} | 66 virtual ~SynchronousCompositorFactory() {} |
| 65 }; | 67 }; |
| 66 | 68 |
| 67 } | 69 } |
| 68 | 70 |
| 69 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_FACTORY_H_ | 71 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_FACTORY_H_ |
| OLD | NEW |