| 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 CCLayerTreeHostClient_h | 5 #ifndef CCLayerTreeHostClient_h |
| 6 #define CCLayerTreeHostClient_h | 6 #define CCLayerTreeHostClient_h |
| 7 | 7 |
| 8 #include <wtf/PassOwnPtr.h> | 8 #include <wtf/PassOwnPtr.h> |
| 9 | 9 |
| 10 namespace WebKit { | 10 namespace WebKit { |
| 11 class WebCompositorOutputSurface; | 11 class WebCompositorOutputSurface; |
| 12 } | 12 } |
| 13 | 13 |
| 14 namespace WebCore { | 14 namespace WebCore { |
| 15 class CCInputHandler; |
| 15 class IntSize; | 16 class IntSize; |
| 16 | 17 |
| 17 class CCLayerTreeHostClient { | 18 class CCLayerTreeHostClient { |
| 18 public: | 19 public: |
| 19 virtual void willBeginFrame() = 0; | 20 virtual void willBeginFrame() = 0; |
| 20 // Marks finishing compositing-related tasks on the main thread. In threaded
mode, this corresponds to didCommit(). | 21 // Marks finishing compositing-related tasks on the main thread. In threaded
mode, this corresponds to didCommit(). |
| 21 virtual void didBeginFrame() = 0; | 22 virtual void didBeginFrame() = 0; |
| 22 virtual void animate(double frameBeginTime) = 0; | 23 virtual void animate(double frameBeginTime) = 0; |
| 23 virtual void layout() = 0; | 24 virtual void layout() = 0; |
| 24 virtual void applyScrollAndScale(const IntSize& scrollDelta, float pageScale
) = 0; | 25 virtual void applyScrollAndScale(const IntSize& scrollDelta, float pageScale
) = 0; |
| 25 virtual PassOwnPtr<WebKit::WebCompositorOutputSurface> createOutputSurface()
= 0; | 26 virtual PassOwnPtr<WebKit::WebCompositorOutputSurface> createOutputSurface()
= 0; |
| 26 virtual void didRecreateOutputSurface(bool success) = 0; | 27 virtual void didRecreateOutputSurface(bool success) = 0; |
| 28 virtual PassOwnPtr<CCInputHandler> createInputHandler() = 0; |
| 27 virtual void willCommit() = 0; | 29 virtual void willCommit() = 0; |
| 28 virtual void didCommit() = 0; | 30 virtual void didCommit() = 0; |
| 29 virtual void didCommitAndDrawFrame() = 0; | 31 virtual void didCommitAndDrawFrame() = 0; |
| 30 virtual void didCompleteSwapBuffers() = 0; | 32 virtual void didCompleteSwapBuffers() = 0; |
| 31 | 33 |
| 32 // Used only in the single-threaded path. | 34 // Used only in the single-threaded path. |
| 33 virtual void scheduleComposite() = 0; | 35 virtual void scheduleComposite() = 0; |
| 34 | 36 |
| 35 protected: | 37 protected: |
| 36 virtual ~CCLayerTreeHostClient() { } | 38 virtual ~CCLayerTreeHostClient() { } |
| 37 }; | 39 }; |
| 38 | 40 |
| 39 } | 41 } |
| 40 | 42 |
| 41 #endif // CCLayerTreeHostClient_h | 43 #endif // CCLayerTreeHostClient_h |
| OLD | NEW |