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 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 class SynchronousCompositorFactory { | 28 class SynchronousCompositorFactory { |
29 public: | 29 public: |
30 // Must only be called once, e.g. on startup. Ownership of |instance| remains | 30 // Must only be called once, e.g. on startup. Ownership of |instance| remains |
31 // with the caller. | 31 // with the caller. |
32 static void SetInstance(SynchronousCompositorFactory* instance); | 32 static void SetInstance(SynchronousCompositorFactory* instance); |
33 static SynchronousCompositorFactory* GetInstance(); | 33 static SynchronousCompositorFactory* GetInstance(); |
34 | 34 |
35 virtual scoped_refptr<base::MessageLoopProxy> | 35 virtual scoped_refptr<base::MessageLoopProxy> |
36 GetCompositorMessageLoop() = 0; | 36 GetCompositorMessageLoop() = 0; |
37 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface( | 37 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface( |
38 int routing_id) = 0; | 38 int routing_id, |
| 39 size_t max_transfer_buffer_usage_bytes) = 0; |
39 | 40 |
40 // The factory maintains ownership of the returned interface. | 41 // The factory maintains ownership of the returned interface. |
41 virtual InputHandlerManagerClient* GetInputHandlerManagerClient() = 0; | 42 virtual InputHandlerManagerClient* GetInputHandlerManagerClient() = 0; |
42 | 43 |
43 virtual scoped_refptr<cc::ContextProvider> | 44 virtual scoped_refptr<cc::ContextProvider> |
44 GetOffscreenContextProviderForMainThread() = 0; | 45 GetOffscreenContextProviderForMainThread() = 0; |
45 virtual scoped_refptr<cc::ContextProvider> | 46 virtual scoped_refptr<cc::ContextProvider> |
46 GetOffscreenContextProviderForCompositorThread() = 0; | 47 GetOffscreenContextProviderForCompositorThread() = 0; |
47 | 48 |
48 protected: | 49 protected: |
49 SynchronousCompositorFactory() {} | 50 SynchronousCompositorFactory() {} |
50 ~SynchronousCompositorFactory() {} | 51 ~SynchronousCompositorFactory() {} |
51 }; | 52 }; |
52 | 53 |
53 } | 54 } |
54 | 55 |
55 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_FACTORY_H_ | 56 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_FACTORY_H_ |
OLD | NEW |