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 WEBKIT_COMPOSITOR_BINDINGS_WEB_LAYER_TREE_VIEW_IMPL_FOR_TESTING_H_ | 5 #ifndef WEBKIT_COMPOSITOR_BINDINGS_WEB_LAYER_TREE_VIEW_IMPL_FOR_TESTING_H_ |
6 #define WEBKIT_COMPOSITOR_BINDINGS_WEB_LAYER_TREE_VIEW_IMPL_FOR_TESTING_H_ | 6 #define WEBKIT_COMPOSITOR_BINDINGS_WEB_LAYER_TREE_VIEW_IMPL_FOR_TESTING_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "cc/layer_tree_host_client.h" | 9 #include "cc/layer_tree_host_client.h" |
10 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeView.h" | 10 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeView.h" |
11 #include "webkit/compositor_bindings/webkit_compositor_bindings_export.h" | 11 #include "webkit/compositor_bindings/webkit_compositor_bindings_export.h" |
| 12 #include "webkit/support/webkit_support.h" |
12 | 13 |
13 namespace cc { | 14 namespace cc { |
14 class LayerTreeHost; | 15 class LayerTreeHost; |
15 class Thread; | 16 class Thread; |
16 } | 17 } |
17 | 18 |
18 namespace WebKit { | 19 namespace WebKit { |
19 class WebLayer; | 20 class WebLayer; |
20 class WebLayerTreeViewClient; | 21 class WebLayerTreeViewClient; |
21 class WebLayerTreeViewClientAdapter; | 22 class WebLayerTreeViewClientAdapter; |
22 | 23 |
23 class WebLayerTreeViewImplForTesting : public WebKit::WebLayerTreeView, | 24 class WebLayerTreeViewImplForTesting : public WebKit::WebLayerTreeView, |
24 public cc::LayerTreeHostClient { | 25 public cc::LayerTreeHostClient { |
25 public: | 26 public: |
26 enum RenderingType { | 27 enum RenderingType { |
27 FAKE_CONTEXT, | 28 FAKE_CONTEXT, |
28 SOFTWARE_CONTEXT, | 29 SOFTWARE_CONTEXT, |
29 MESA_CONTEXT | 30 MESA_CONTEXT |
30 }; | 31 }; |
31 WEBKIT_COMPOSITOR_BINDINGS_EXPORT WebLayerTreeViewImplForTesting( | 32 WEBKIT_COMPOSITOR_BINDINGS_EXPORT WebLayerTreeViewImplForTesting( |
32 RenderingType type, | 33 RenderingType type, |
| 34 webkit_support::DRTLayerTreeViewClient* client); |
| 35 WEBKIT_COMPOSITOR_BINDINGS_EXPORT WebLayerTreeViewImplForTesting( |
| 36 RenderingType type, |
33 WebKit::WebLayerTreeViewClient* client); | 37 WebKit::WebLayerTreeViewClient* client); |
34 virtual ~WebLayerTreeViewImplForTesting(); | 38 virtual ~WebLayerTreeViewImplForTesting(); |
35 | 39 |
36 WEBKIT_COMPOSITOR_BINDINGS_EXPORT bool initialize( | 40 WEBKIT_COMPOSITOR_BINDINGS_EXPORT bool initialize( |
37 scoped_ptr<cc::Thread> compositor_thread); | 41 scoped_ptr<cc::Thread> compositor_thread); |
38 | 42 |
39 // WebLayerTreeView implementation. | 43 // WebLayerTreeView implementation. |
40 virtual void setSurfaceReady(); | 44 virtual void setSurfaceReady(); |
41 virtual void setRootLayer(const WebLayer&); | 45 virtual void setRootLayer(const WebLayer&); |
42 virtual void clearRootLayer(); | 46 virtual void clearRootLayer(); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 virtual void didCommitAndDrawFrame() OVERRIDE; | 86 virtual void didCommitAndDrawFrame() OVERRIDE; |
83 virtual void didCompleteSwapBuffers() OVERRIDE; | 87 virtual void didCompleteSwapBuffers() OVERRIDE; |
84 virtual void scheduleComposite() OVERRIDE; | 88 virtual void scheduleComposite() OVERRIDE; |
85 virtual scoped_refptr<cc::ContextProvider> | 89 virtual scoped_refptr<cc::ContextProvider> |
86 OffscreenContextProviderForMainThread() OVERRIDE; | 90 OffscreenContextProviderForMainThread() OVERRIDE; |
87 virtual scoped_refptr<cc::ContextProvider> | 91 virtual scoped_refptr<cc::ContextProvider> |
88 OffscreenContextProviderForCompositorThread() OVERRIDE; | 92 OffscreenContextProviderForCompositorThread() OVERRIDE; |
89 | 93 |
90 private: | 94 private: |
91 RenderingType type_; | 95 RenderingType type_; |
| 96 webkit_support::DRTLayerTreeViewClient* drt_client_; |
92 WebKit::WebLayerTreeViewClient* client_; | 97 WebKit::WebLayerTreeViewClient* client_; |
93 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; | 98 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; |
94 | 99 |
95 class MainThreadContextProvider; | 100 class MainThreadContextProvider; |
96 scoped_refptr<MainThreadContextProvider> contexts_main_thread_; | 101 scoped_refptr<MainThreadContextProvider> contexts_main_thread_; |
97 class CompositorThreadContextProvider; | 102 class CompositorThreadContextProvider; |
98 scoped_refptr<CompositorThreadContextProvider> contexts_compositor_thread_; | 103 scoped_refptr<CompositorThreadContextProvider> contexts_compositor_thread_; |
99 }; | 104 }; |
100 | 105 |
101 } // namespace Web_kit | 106 } // namespace Web_kit |
102 | 107 |
103 #endif // WEBKIT_COMPOSITOR_BINDINGS_WEB_LAYER_TREE_VIEW_IMPL_FOR_TESTING_H_ | 108 #endif // WEBKIT_COMPOSITOR_BINDINGS_WEB_LAYER_TREE_VIEW_IMPL_FOR_TESTING_H_ |
OLD | NEW |