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 "CCLayerTreeHostClient.h" | 8 #include "CCLayerTreeHostClient.h" |
9 #include <public/WebLayerTreeView.h> | 9 #include <public/WebLayerTreeView.h> |
10 #include <wtf/OwnPtr.h> | 10 #include <wtf/OwnPtr.h> |
11 #include <wtf/PassOwnPtr.h> | 11 #include <wtf/PassOwnPtr.h> |
12 | 12 |
13 namespace WebCore { | 13 namespace cc { |
14 class CCLayerTreeHost; | 14 class CCLayerTreeHost; |
15 } | 15 } |
16 | 16 |
17 namespace WebKit { | 17 namespace WebKit { |
18 class WebLayer; | 18 class WebLayer; |
19 class WebLayerTreeViewClient; | 19 class WebLayerTreeViewClient; |
20 class WebLayerTreeViewClientAdapter; | 20 class WebLayerTreeViewClientAdapter; |
21 | 21 |
22 class WebLayerTreeViewImpl : public WebLayerTreeView, public WebCore::CCLayerTre
eHostClient { | 22 class WebLayerTreeViewImpl : public WebLayerTreeView, public cc::CCLayerTreeHost
Client { |
23 public: | 23 public: |
24 explicit WebLayerTreeViewImpl(WebLayerTreeViewClient*); | 24 explicit WebLayerTreeViewImpl(WebLayerTreeViewClient*); |
25 virtual ~WebLayerTreeViewImpl(); | 25 virtual ~WebLayerTreeViewImpl(); |
26 | 26 |
27 bool initialize(const Settings&); | 27 bool initialize(const Settings&); |
28 | 28 |
29 // WebLayerTreeView implementation. | 29 // WebLayerTreeView implementation. |
30 virtual void setSurfaceReady() OVERRIDE; | 30 virtual void setSurfaceReady() OVERRIDE; |
31 virtual void setRootLayer(const WebLayer&) OVERRIDE; | 31 virtual void setRootLayer(const WebLayer&) OVERRIDE; |
32 virtual void clearRootLayer() OVERRIDE; | 32 virtual void clearRootLayer() OVERRIDE; |
(...skipping 11 matching lines...) Expand all Loading... |
44 virtual void setNeedsRedraw() OVERRIDE; | 44 virtual void setNeedsRedraw() OVERRIDE; |
45 virtual bool commitRequested() const OVERRIDE; | 45 virtual bool commitRequested() const OVERRIDE; |
46 virtual void composite() OVERRIDE; | 46 virtual void composite() OVERRIDE; |
47 virtual void updateAnimations(double frameBeginTime) OVERRIDE; | 47 virtual void updateAnimations(double frameBeginTime) OVERRIDE; |
48 virtual bool compositeAndReadback(void *pixels, const WebRect&) OVERRIDE; | 48 virtual bool compositeAndReadback(void *pixels, const WebRect&) OVERRIDE; |
49 virtual void finishAllRendering() OVERRIDE; | 49 virtual void finishAllRendering() OVERRIDE; |
50 virtual void renderingStats(WebRenderingStats&) const OVERRIDE; | 50 virtual void renderingStats(WebRenderingStats&) const OVERRIDE; |
51 virtual void setFontAtlas(SkBitmap, WebRect asciiToRectTable[128], int fontH
eight) OVERRIDE; | 51 virtual void setFontAtlas(SkBitmap, WebRect asciiToRectTable[128], int fontH
eight) OVERRIDE; |
52 virtual void loseCompositorContext(int numTimes) OVERRIDE; | 52 virtual void loseCompositorContext(int numTimes) OVERRIDE; |
53 | 53 |
54 // WebCore::CCLayerTreeHostClient implementation. | 54 // cc::CCLayerTreeHostClient implementation. |
55 virtual void willBeginFrame() OVERRIDE; | 55 virtual void willBeginFrame() OVERRIDE; |
56 virtual void didBeginFrame() OVERRIDE; | 56 virtual void didBeginFrame() OVERRIDE; |
57 virtual void animate(double monotonicFrameBeginTime) OVERRIDE; | 57 virtual void animate(double monotonicFrameBeginTime) OVERRIDE; |
58 virtual void layout() OVERRIDE; | 58 virtual void layout() OVERRIDE; |
59 virtual void applyScrollAndScale(const WebCore::IntSize& scrollDelta, float
pageScale) OVERRIDE; | 59 virtual void applyScrollAndScale(const cc::IntSize& scrollDelta, float pageS
cale) OVERRIDE; |
60 virtual PassOwnPtr<WebCompositorOutputSurface> createOutputSurface() OVERRID
E; | 60 virtual PassOwnPtr<WebCompositorOutputSurface> createOutputSurface() OVERRID
E; |
61 virtual void didRecreateOutputSurface(bool success) OVERRIDE; | 61 virtual void didRecreateOutputSurface(bool success) OVERRIDE; |
62 virtual PassOwnPtr<WebCore::CCInputHandler> createInputHandler() OVERRIDE; | 62 virtual PassOwnPtr<cc::CCInputHandler> createInputHandler() OVERRIDE; |
63 virtual void willCommit() OVERRIDE; | 63 virtual void willCommit() OVERRIDE; |
64 virtual void didCommit() OVERRIDE; | 64 virtual void didCommit() OVERRIDE; |
65 virtual void didCommitAndDrawFrame() OVERRIDE; | 65 virtual void didCommitAndDrawFrame() OVERRIDE; |
66 virtual void didCompleteSwapBuffers() OVERRIDE; | 66 virtual void didCompleteSwapBuffers() OVERRIDE; |
67 virtual void scheduleComposite() OVERRIDE; | 67 virtual void scheduleComposite() OVERRIDE; |
68 | 68 |
69 private: | 69 private: |
70 WebLayerTreeViewClient* m_client; | 70 WebLayerTreeViewClient* m_client; |
71 OwnPtr<WebCore::CCLayerTreeHost> m_layerTreeHost; | 71 OwnPtr<cc::CCLayerTreeHost> m_layerTreeHost; |
72 }; | 72 }; |
73 | 73 |
74 } // namespace WebKit | 74 } // namespace WebKit |
75 | 75 |
76 #endif // WebLayerTreeViewImpl_h | 76 #endif // WebLayerTreeViewImpl_h |
OLD | NEW |