| 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 CC_TEST_FAKE_LAYER_TREE_HOST_CLIENT_H_ | 5 #ifndef CC_TEST_FAKE_LAYER_TREE_HOST_CLIENT_H_ |
| 6 #define CC_TEST_FAKE_LAYER_TREE_HOST_CLIENT_H_ | 6 #define CC_TEST_FAKE_LAYER_TREE_HOST_CLIENT_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "cc/input_handler.h" | 9 #include "cc/input_handler.h" |
| 10 #include "cc/layer_tree_host.h" | 10 #include "cc/layer_tree_host.h" |
| 11 #include "cc/test/fake_context_provider.h" |
| 11 #include "cc/test/fake_output_surface.h" | 12 #include "cc/test/fake_output_surface.h" |
| 12 | 13 |
| 13 namespace cc { | 14 namespace cc { |
| 14 | 15 |
| 15 class FakeLayerImplTreeHostClient : public LayerTreeHostClient { | 16 class FakeLayerImplTreeHostClient : public LayerTreeHostClient { |
| 16 public: | 17 public: |
| 17 FakeLayerImplTreeHostClient(bool useSoftwareRendering = false, bool useDeleg
atingRenderer = false) | 18 FakeLayerImplTreeHostClient(bool useSoftwareRendering = false, bool useDeleg
atingRenderer = false); |
| 18 : m_useSoftwareRendering(useSoftwareRendering) | 19 virtual ~FakeLayerImplTreeHostClient(); |
| 19 , m_useDelegatingRenderer(useDelegatingRenderer) | |
| 20 { | |
| 21 } | |
| 22 | 20 |
| 23 virtual void willBeginFrame() OVERRIDE { } | 21 virtual void willBeginFrame() OVERRIDE { } |
| 24 virtual void didBeginFrame() OVERRIDE { } | 22 virtual void didBeginFrame() OVERRIDE { } |
| 25 virtual void animate(double monotonicFrameBeginTime) OVERRIDE { } | 23 virtual void animate(double monotonicFrameBeginTime) OVERRIDE { } |
| 26 virtual void layout() OVERRIDE { } | 24 virtual void layout() OVERRIDE { } |
| 27 virtual void applyScrollAndScale(gfx::Vector2d scrollDelta, float pageScale)
OVERRIDE { } | 25 virtual void applyScrollAndScale(gfx::Vector2d scrollDelta, float pageScale)
OVERRIDE { } |
| 28 | 26 |
| 29 virtual scoped_ptr<OutputSurface> createOutputSurface() OVERRIDE; | 27 virtual scoped_ptr<OutputSurface> createOutputSurface() OVERRIDE; |
| 30 virtual void didRecreateOutputSurface(bool success) OVERRIDE { } | 28 virtual void didRecreateOutputSurface(bool success) OVERRIDE { } |
| 31 virtual scoped_ptr<InputHandler> createInputHandler() OVERRIDE; | 29 virtual scoped_ptr<InputHandler> createInputHandler() OVERRIDE; |
| 32 virtual void willCommit() OVERRIDE { } | 30 virtual void willCommit() OVERRIDE { } |
| 33 virtual void didCommit() OVERRIDE { } | 31 virtual void didCommit() OVERRIDE { } |
| 34 virtual void didCommitAndDrawFrame() OVERRIDE { } | 32 virtual void didCommitAndDrawFrame() OVERRIDE { } |
| 35 virtual void didCompleteSwapBuffers() OVERRIDE { } | 33 virtual void didCompleteSwapBuffers() OVERRIDE { } |
| 36 | 34 |
| 37 // Used only in the single-threaded path. | 35 // Used only in the single-threaded path. |
| 38 virtual void scheduleComposite() OVERRIDE { } | 36 virtual void scheduleComposite() OVERRIDE { } |
| 39 | 37 |
| 38 virtual scoped_refptr<ui::ContextProvider> OffscreenContextProviderForMainTh
read() OVERRIDE; |
| 39 virtual scoped_refptr<ui::ContextProvider> OffscreenContextProviderForCompos
itorThread() OVERRIDE; |
| 40 |
| 40 private: | 41 private: |
| 41 bool m_useSoftwareRendering; | 42 bool m_useSoftwareRendering; |
| 42 bool m_useDelegatingRenderer; | 43 bool m_useDelegatingRenderer; |
| 44 |
| 45 scoped_refptr<FakeContextProvider> m_mainThreadContexts; |
| 46 scoped_refptr<FakeContextProvider> m_compositorThreadContexts; |
| 43 }; | 47 }; |
| 44 | 48 |
| 45 } // namespace cc | 49 } // namespace cc |
| 46 | 50 |
| 47 #endif // CC_TEST_FAKE_LAYER_TREE_HOST_CLIENT_H_ | 51 #endif // CC_TEST_FAKE_LAYER_TREE_HOST_CLIENT_H_ |
| OLD | NEW |