OLD | NEW |
---|---|
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 WebLayerTreeViewImpl_h | 5 #ifndef WebLayerTreeViewImpl_h |
6 #define WebLayerTreeViewImpl_h | 6 #define WebLayerTreeViewImpl_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 "skia/ext/refptr.h" | |
10 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeView.h" | 11 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeView.h" |
12 #include "third_party/skia/include/core/SkPicture.h" | |
jamesr
2013/01/11 21:53:26
don't include this header, forward declare SkPictu
Leandro Graciá Gil
2013/01/15 20:46:11
Done.
| |
11 #include "webkit/compositor_bindings/webkit_compositor_bindings_export.h" | 13 #include "webkit/compositor_bindings/webkit_compositor_bindings_export.h" |
12 | 14 |
13 namespace cc { | 15 namespace cc { |
14 class FontAtlas; | 16 class FontAtlas; |
15 class LayerTreeHost; | 17 class LayerTreeHost; |
16 class Thread; | 18 class Thread; |
17 } | 19 } |
18 | 20 |
19 namespace WebKit { | 21 namespace WebKit { |
20 class WebLayer; | 22 class WebLayer; |
21 class WebLayerTreeViewClient; | 23 class WebLayerTreeViewClient; |
22 class WebLayerTreeViewClientAdapter; | 24 class WebLayerTreeViewClientAdapter; |
23 | 25 |
24 class WebLayerTreeViewImpl : public WebLayerTreeView, public cc::LayerTreeHostCl ient { | 26 class WebLayerTreeViewImpl : public WebLayerTreeView, public cc::LayerTreeHostCl ient { |
25 public: | 27 public: |
26 WEBKIT_COMPOSITOR_BINDINGS_EXPORT explicit WebLayerTreeViewImpl( | 28 WEBKIT_COMPOSITOR_BINDINGS_EXPORT explicit WebLayerTreeViewImpl( |
27 WebLayerTreeViewClient*); | 29 WebLayerTreeViewClient*); |
28 virtual ~WebLayerTreeViewImpl(); | 30 virtual ~WebLayerTreeViewImpl(); |
29 | 31 |
30 WEBKIT_COMPOSITOR_BINDINGS_EXPORT bool initialize( | 32 WEBKIT_COMPOSITOR_BINDINGS_EXPORT bool initialize( |
31 const Settings&, scoped_ptr<cc::Thread> implThread); | 33 const Settings&, scoped_ptr<cc::Thread> implThread); |
32 | 34 |
35 WEBKIT_COMPOSITOR_BINDINGS_EXPORT skia::RefPtr<SkPicture> capturePicture(); | |
jamesr
2013/01/11 21:53:26
why are you exposing this on WLTVI instead of just
Leandro Graciá Gil
2013/01/12 00:26:09
How else can we access cc::LayerTreeHost directly
| |
36 | |
33 // WebLayerTreeView implementation. | 37 // WebLayerTreeView implementation. |
34 virtual void setSurfaceReady() OVERRIDE; | 38 virtual void setSurfaceReady() OVERRIDE; |
35 virtual void setRootLayer(const WebLayer&) OVERRIDE; | 39 virtual void setRootLayer(const WebLayer&) OVERRIDE; |
36 virtual void clearRootLayer() OVERRIDE; | 40 virtual void clearRootLayer() OVERRIDE; |
37 virtual void setViewportSize(const WebSize& layoutViewportSize, const WebSiz e& deviceViewportSize = WebSize()) OVERRIDE; | 41 virtual void setViewportSize(const WebSize& layoutViewportSize, const WebSiz e& deviceViewportSize = WebSize()) OVERRIDE; |
38 virtual WebSize layoutViewportSize() const OVERRIDE; | 42 virtual WebSize layoutViewportSize() const OVERRIDE; |
39 virtual WebSize deviceViewportSize() const OVERRIDE; | 43 virtual WebSize deviceViewportSize() const OVERRIDE; |
40 virtual WebFloatPoint adjustEventPointForPinchZoom(const WebFloatPoint& poin t) const OVERRIDE; | 44 virtual WebFloatPoint adjustEventPointForPinchZoom(const WebFloatPoint& poin t) const OVERRIDE; |
41 virtual void setDeviceScaleFactor(float) OVERRIDE; | 45 virtual void setDeviceScaleFactor(float) OVERRIDE; |
42 virtual float deviceScaleFactor() const OVERRIDE; | 46 virtual float deviceScaleFactor() const OVERRIDE; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
76 virtual scoped_ptr<cc::FontAtlas> createFontAtlas(); | 80 virtual scoped_ptr<cc::FontAtlas> createFontAtlas(); |
77 | 81 |
78 private: | 82 private: |
79 WebLayerTreeViewClient* m_client; | 83 WebLayerTreeViewClient* m_client; |
80 scoped_ptr<cc::LayerTreeHost> m_layerTreeHost; | 84 scoped_ptr<cc::LayerTreeHost> m_layerTreeHost; |
81 }; | 85 }; |
82 | 86 |
83 } // namespace WebKit | 87 } // namespace WebKit |
84 | 88 |
85 #endif // WebLayerTreeViewImpl_h | 89 #endif // WebLayerTreeViewImpl_h |
OLD | NEW |