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 "third_party/WebKit/public/platform/WebGraphicsContext3D.h" | 10 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 // this will be injected from the logical 'browser' side code. | 35 // this will be injected from the logical 'browser' side code. |
36 class SynchronousCompositorFactory { | 36 class SynchronousCompositorFactory { |
37 public: | 37 public: |
38 // Must only be called once, e.g. on startup. Ownership of |instance| remains | 38 // Must only be called once, e.g. on startup. Ownership of |instance| remains |
39 // with the caller. | 39 // with the caller. |
40 static void SetInstance(SynchronousCompositorFactory* instance); | 40 static void SetInstance(SynchronousCompositorFactory* instance); |
41 static SynchronousCompositorFactory* GetInstance(); | 41 static SynchronousCompositorFactory* GetInstance(); |
42 | 42 |
43 virtual scoped_refptr<base::MessageLoopProxy> | 43 virtual scoped_refptr<base::MessageLoopProxy> |
44 GetCompositorMessageLoop() = 0; | 44 GetCompositorMessageLoop() = 0; |
| 45 virtual bool RecordFullLayer() = 0; |
45 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface( | 46 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface( |
46 int routing_id) = 0; | 47 int routing_id) = 0; |
47 | 48 |
48 // The factory maintains ownership of the returned interface. | 49 // The factory maintains ownership of the returned interface. |
49 virtual InputHandlerManagerClient* GetInputHandlerManagerClient() = 0; | 50 virtual InputHandlerManagerClient* GetInputHandlerManagerClient() = 0; |
50 | 51 |
51 virtual scoped_refptr<webkit::gpu::ContextProviderWebContext> | 52 virtual scoped_refptr<webkit::gpu::ContextProviderWebContext> |
52 GetSharedOffscreenContextProviderForMainThread() = 0; | 53 GetSharedOffscreenContextProviderForMainThread() = 0; |
53 virtual scoped_refptr<StreamTextureFactory> CreateStreamTextureFactory( | 54 virtual scoped_refptr<StreamTextureFactory> CreateStreamTextureFactory( |
54 int frame_id) = 0; | 55 int frame_id) = 0; |
55 virtual blink::WebGraphicsContext3D* CreateOffscreenGraphicsContext3D( | 56 virtual blink::WebGraphicsContext3D* CreateOffscreenGraphicsContext3D( |
56 const blink::WebGraphicsContext3D::Attributes& attributes) = 0; | 57 const blink::WebGraphicsContext3D::Attributes& attributes) = 0; |
57 | 58 |
58 protected: | 59 protected: |
59 SynchronousCompositorFactory() {} | 60 SynchronousCompositorFactory() {} |
60 virtual ~SynchronousCompositorFactory() {} | 61 virtual ~SynchronousCompositorFactory() {} |
61 }; | 62 }; |
62 | 63 |
63 } | 64 } |
64 | 65 |
65 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_FACTORY_H_ | 66 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_FACTORY_H_ |
OLD | NEW |