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 "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeView.h" | 10 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeView.h" |
11 | 11 |
12 namespace cc { | 12 namespace cc { |
13 class FontAtlas; | 13 class FontAtlas; |
14 class LayerTreeHost; | 14 class LayerTreeHost; |
15 class Thread; | 15 class Thread; |
16 } | 16 } |
17 | 17 |
18 namespace WebKit { | 18 namespace WebKit { |
19 class WebLayer; | 19 class WebLayer; |
20 class WebLayerTreeViewClient; | 20 class WebLayerTreeViewClient; |
21 class WebLayerTreeViewClientAdapter; | 21 class WebLayerTreeViewClientAdapter; |
| 22 struct WebLatencyInfo; |
| 23 struct WebLatencyInfoImpl; |
22 | 24 |
23 class WebLayerTreeViewImpl : public WebLayerTreeView, public cc::LayerTreeHostCl
ient { | 25 class WebLayerTreeViewImpl : public WebLayerTreeView, public cc::LayerTreeHostCl
ient { |
24 public: | 26 public: |
25 explicit WebLayerTreeViewImpl(WebLayerTreeViewClient*); | 27 explicit WebLayerTreeViewImpl(WebLayerTreeViewClient*); |
26 virtual ~WebLayerTreeViewImpl(); | 28 virtual ~WebLayerTreeViewImpl(); |
27 | 29 |
28 bool initialize(const Settings&, scoped_ptr<cc::Thread> implThread); | 30 bool initialize(const Settings&, scoped_ptr<cc::Thread> implThread); |
29 | 31 |
30 // WebLayerTreeView implementation. | 32 // WebLayerTreeView implementation. |
31 virtual void setSurfaceReady() OVERRIDE; | 33 virtual void setSurfaceReady() OVERRIDE; |
(...skipping 15 matching lines...) Expand all Loading... |
47 virtual bool commitRequested() const OVERRIDE; | 49 virtual bool commitRequested() const OVERRIDE; |
48 virtual void composite() OVERRIDE; | 50 virtual void composite() OVERRIDE; |
49 virtual void updateAnimations(double frameBeginTime) OVERRIDE; | 51 virtual void updateAnimations(double frameBeginTime) OVERRIDE; |
50 virtual bool compositeAndReadback(void *pixels, const WebRect&) OVERRIDE; | 52 virtual bool compositeAndReadback(void *pixels, const WebRect&) OVERRIDE; |
51 virtual void finishAllRendering() OVERRIDE; | 53 virtual void finishAllRendering() OVERRIDE; |
52 virtual void setDeferCommits(bool deferCommits) OVERRIDE; | 54 virtual void setDeferCommits(bool deferCommits) OVERRIDE; |
53 virtual void renderingStats(WebRenderingStats&) const OVERRIDE; | 55 virtual void renderingStats(WebRenderingStats&) const OVERRIDE; |
54 virtual void setShowFPSCounter(bool show); | 56 virtual void setShowFPSCounter(bool show); |
55 virtual void setShowPaintRects(bool show); | 57 virtual void setShowPaintRects(bool show); |
56 virtual void loseCompositorContext(int numTimes) OVERRIDE; | 58 virtual void loseCompositorContext(int numTimes) OVERRIDE; |
| 59 virtual void setLatencyInfo(const WebKit::WebLatencyInfo&) OVERRIDE; |
57 | 60 |
58 // cc::LayerTreeHostClient implementation. | 61 // cc::LayerTreeHostClient implementation. |
59 virtual void willBeginFrame() OVERRIDE; | 62 virtual void willBeginFrame() OVERRIDE; |
60 virtual void didBeginFrame() OVERRIDE; | 63 virtual void didBeginFrame() OVERRIDE; |
61 virtual void animate(double monotonicFrameBeginTime) OVERRIDE; | 64 virtual void animate(double monotonicFrameBeginTime) OVERRIDE; |
62 virtual void layout() OVERRIDE; | 65 virtual void layout() OVERRIDE; |
63 virtual void applyScrollAndScale(gfx::Vector2d scrollDelta, float pageScale)
OVERRIDE; | 66 virtual void applyScrollAndScale(gfx::Vector2d scrollDelta, float pageScale)
OVERRIDE; |
64 virtual scoped_ptr<cc::OutputSurface> createOutputSurface() OVERRIDE; | 67 virtual scoped_ptr<cc::OutputSurface> createOutputSurface() OVERRIDE; |
65 virtual void didRecreateOutputSurface(bool success) OVERRIDE; | 68 virtual void didRecreateOutputSurface(bool success) OVERRIDE; |
66 virtual scoped_ptr<cc::InputHandler> createInputHandler() OVERRIDE; | 69 virtual scoped_ptr<cc::InputHandler> createInputHandler() OVERRIDE; |
67 virtual void willCommit() OVERRIDE; | 70 virtual void willCommit() OVERRIDE; |
68 virtual void didCommit() OVERRIDE; | 71 virtual void didCommit() OVERRIDE; |
69 virtual void didCommitAndDrawFrame() OVERRIDE; | 72 virtual void didCommitAndDrawFrame() OVERRIDE; |
70 virtual void didCompleteSwapBuffers() OVERRIDE; | 73 virtual void didCompleteSwapBuffers() OVERRIDE; |
71 virtual void scheduleComposite() OVERRIDE; | 74 virtual void scheduleComposite() OVERRIDE; |
72 virtual scoped_ptr<cc::FontAtlas> createFontAtlas(); | 75 virtual scoped_ptr<cc::FontAtlas> createFontAtlas(); |
| 76 virtual void onReceivedLatencyInfo(const WebKit::WebLatencyInfoImpl&) OVERRI
DE; |
73 | 77 |
74 private: | 78 private: |
75 WebLayerTreeViewClient* m_client; | 79 WebLayerTreeViewClient* m_client; |
76 scoped_ptr<cc::LayerTreeHost> m_layerTreeHost; | 80 scoped_ptr<cc::LayerTreeHost> m_layerTreeHost; |
77 }; | 81 }; |
78 | 82 |
79 } // namespace WebKit | 83 } // namespace WebKit |
80 | 84 |
81 #endif // WebLayerTreeViewImpl_h | 85 #endif // WebLayerTreeViewImpl_h |
OLD | NEW |