OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 CCRenderer_h | 5 #ifndef CCRenderer_h |
6 #define CCRenderer_h | 6 #define CCRenderer_h |
7 | 7 |
8 #include "CCLayerTreeHost.h" | 8 #include "CCLayerTreeHost.h" |
9 #include "CCRenderPass.h" | 9 #include "CCRenderPass.h" |
10 #include "FloatQuad.h" | 10 #include "FloatQuad.h" |
11 #include "IntRect.h" | 11 #include "IntRect.h" |
12 #include <wtf/Noncopyable.h> | 12 #include <wtf/Noncopyable.h> |
13 #include <wtf/PassRefPtr.h> | 13 #include <wtf/PassRefPtr.h> |
14 | 14 |
| 15 namespace WebKit { |
| 16 struct WebCompositorFrameAck; |
| 17 } |
| 18 |
15 namespace WebCore { | 19 namespace WebCore { |
16 | 20 |
17 class CCScopedTexture; | 21 class CCScopedTexture; |
18 | 22 |
19 class CCRendererClient { | 23 class CCRendererClient { |
20 public: | 24 public: |
21 virtual const IntSize& deviceViewportSize() const = 0; | 25 virtual const IntSize& deviceViewportSize() const = 0; |
22 virtual const CCLayerTreeSettings& settings() const = 0; | 26 virtual const CCLayerTreeSettings& settings() const = 0; |
23 virtual void didLoseContext() = 0; | 27 virtual void didLoseContext() = 0; |
24 virtual void onSwapBuffersComplete() = 0; | 28 virtual void onSwapBuffersComplete() = 0; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 65 |
62 virtual void doNoOp() { } | 66 virtual void doNoOp() { } |
63 // puts backbuffer onscreen | 67 // puts backbuffer onscreen |
64 virtual bool swapBuffers() = 0; | 68 virtual bool swapBuffers() = 0; |
65 | 69 |
66 virtual void getFramebufferPixels(void *pixels, const IntRect&) = 0; | 70 virtual void getFramebufferPixels(void *pixels, const IntRect&) = 0; |
67 | 71 |
68 virtual bool isContextLost() { return false; } | 72 virtual bool isContextLost() { return false; } |
69 | 73 |
70 virtual void setVisible(bool) = 0; | 74 virtual void setVisible(bool) = 0; |
| 75 virtual void onSendFrameToParentCompositorAck(const WebKit::WebCompositorFra
meAck&) { } |
71 | 76 |
72 protected: | 77 protected: |
73 explicit CCRenderer(CCRendererClient* client) | 78 explicit CCRenderer(CCRendererClient* client) |
74 : m_client(client) | 79 : m_client(client) |
75 { | 80 { |
76 } | 81 } |
77 | 82 |
78 CCRendererClient* m_client; | 83 CCRendererClient* m_client; |
79 }; | 84 }; |
80 | 85 |
81 } | 86 } |
82 | 87 |
83 #endif // CCRenderer_h | 88 #endif // CCRenderer_h |
OLD | NEW |