Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Side by Side Diff: content/renderer/android/synchronous_compositor_factory.h

Issue 1126963006: Move VISUAL_STATE promise to activation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Current state (presubmit warnings, cc_unittests tests failing) Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 13 matching lines...) Expand all
24 } 24 }
25 25
26 namespace gpu_blink { 26 namespace gpu_blink {
27 class WebGraphicsContext3DInProcessCommandBufferImpl; 27 class WebGraphicsContext3DInProcessCommandBufferImpl;
28 } 28 }
29 29
30 namespace content { 30 namespace content {
31 31
32 class InputHandlerManagerClient; 32 class InputHandlerManagerClient;
33 class StreamTextureFactory; 33 class StreamTextureFactory;
34 class FrameSwapMessageQueue; 34 class FrameUpdateMessageQueue;
35 35
36 // Decouples creation from usage of the parts needed for the synchonous 36 // Decouples creation from usage of the parts needed for the synchonous
37 // compositor rendering path. In practice this is only used in single 37 // compositor rendering path. In practice this is only used in single
38 // process mode (namely, for Android WebView) hence the implementation of 38 // process mode (namely, for Android WebView) hence the implementation of
39 // this will be injected from the logical 'browser' side code. 39 // this will be injected from the logical 'browser' side code.
40 class SynchronousCompositorFactory { 40 class SynchronousCompositorFactory {
41 public: 41 public:
42 // Must only be called once, e.g. on startup. Ownership of |instance| remains 42 // Must only be called once, e.g. on startup. Ownership of |instance| remains
43 // with the caller. 43 // with the caller.
44 static void SetInstance(SynchronousCompositorFactory* instance); 44 static void SetInstance(SynchronousCompositorFactory* instance);
45 static SynchronousCompositorFactory* GetInstance(); 45 static SynchronousCompositorFactory* GetInstance();
46 46
47 virtual scoped_refptr<base::MessageLoopProxy> 47 virtual scoped_refptr<base::MessageLoopProxy>
48 GetCompositorMessageLoop() = 0; 48 GetCompositorMessageLoop() = 0;
49 virtual bool RecordFullLayer() = 0; 49 virtual bool RecordFullLayer() = 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 scoped_refptr<FrameUpdateMessageQueue> frame_update_message_queue) = 0;
53 53
54 // The factory maintains ownership of the returned interface. 54 // The factory maintains ownership of the returned interface.
55 virtual InputHandlerManagerClient* GetInputHandlerManagerClient() = 0; 55 virtual InputHandlerManagerClient* GetInputHandlerManagerClient() = 0;
56 56
57 virtual scoped_ptr<cc::BeginFrameSource> CreateExternalBeginFrameSource( 57 virtual scoped_ptr<cc::BeginFrameSource> CreateExternalBeginFrameSource(
58 int routing_id) = 0; 58 int routing_id) = 0;
59 59
60 virtual scoped_refptr<cc_blink::ContextProviderWebContext> 60 virtual scoped_refptr<cc_blink::ContextProviderWebContext>
61 CreateOffscreenContextProvider( 61 CreateOffscreenContextProvider(
62 const blink::WebGraphicsContext3D::Attributes& attributes, 62 const blink::WebGraphicsContext3D::Attributes& attributes,
63 const std::string& debug_name) = 0; 63 const std::string& debug_name) = 0;
64 virtual scoped_refptr<StreamTextureFactory> CreateStreamTextureFactory( 64 virtual scoped_refptr<StreamTextureFactory> CreateStreamTextureFactory(
65 int frame_id) = 0; 65 int frame_id) = 0;
66 virtual gpu_blink::WebGraphicsContext3DInProcessCommandBufferImpl* 66 virtual gpu_blink::WebGraphicsContext3DInProcessCommandBufferImpl*
67 CreateOffscreenGraphicsContext3D( 67 CreateOffscreenGraphicsContext3D(
68 const blink::WebGraphicsContext3D::Attributes& attributes) = 0; 68 const blink::WebGraphicsContext3D::Attributes& attributes) = 0;
69 69
70 protected: 70 protected:
71 SynchronousCompositorFactory() {} 71 SynchronousCompositorFactory() {}
72 virtual ~SynchronousCompositorFactory() {} 72 virtual ~SynchronousCompositorFactory() {}
73 }; 73 };
74 74
75 } 75 }
76 76
77 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_FACTORY_H_ 77 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698