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/font_atlas.h" | 9 #include "cc/font_atlas.h" |
10 #include "cc/input_handler.h" | 10 #include "cc/input_handler.h" |
11 #include "cc/layer_tree_host.h" | 11 #include "cc/layer_tree_host.h" |
12 #include "cc/test/fake_output_surface.h" | 12 #include "cc/test/fake_output_surface.h" |
13 | 13 |
14 namespace cc { | 14 namespace cc { |
15 | 15 |
16 class FakeLayerImplTreeHostClient : public LayerTreeHostClient { | 16 class FakeLayerImplTreeHostClient : public LayerTreeHostClient { |
17 public: | 17 public: |
18 FakeLayerImplTreeHostClient(bool useSoftwareRendering = false, bool useDeleg
atingRenderer = false) | 18 FakeLayerImplTreeHostClient(bool useSoftwareRendering = false, bool useDeleg
atingRenderer = false); |
19 : m_useSoftwareRendering(useSoftwareRendering) | 19 virtual ~FakeLayerImplTreeHostClient(); |
20 , m_useDelegatingRenderer(useDelegatingRenderer) | |
21 { | |
22 } | |
23 | 20 |
24 virtual void willBeginFrame() OVERRIDE { } | 21 virtual void willBeginFrame() OVERRIDE { } |
25 virtual void didBeginFrame() OVERRIDE { } | 22 virtual void didBeginFrame() OVERRIDE { } |
26 virtual void animate(double monotonicFrameBeginTime) OVERRIDE { } | 23 virtual void animate(double monotonicFrameBeginTime) OVERRIDE { } |
27 virtual void layout() OVERRIDE { } | 24 virtual void layout() OVERRIDE { } |
28 virtual void applyScrollAndScale(gfx::Vector2d scrollDelta, float pageScale)
OVERRIDE { } | 25 virtual void applyScrollAndScale(gfx::Vector2d scrollDelta, float pageScale)
OVERRIDE { } |
29 | 26 |
30 virtual scoped_ptr<OutputSurface> createOutputSurface() OVERRIDE; | 27 virtual scoped_ptr<OutputSurface> createOutputSurface() OVERRIDE; |
31 virtual void didRecreateOutputSurface(bool success) OVERRIDE { } | 28 virtual void didRecreateOutputSurface(bool success) OVERRIDE { } |
| 29 virtual WebKit::WebGraphicsContext3D* OffscreenContext3dForMainThread() OVER
RIDE; |
| 30 virtual WebKit::WebGraphicsContext3D* OffscreenContext3dForCompositorThread(
) OVERRIDE; |
| 31 virtual GrContext* OffscreenGrContextForMainThread() OVERRIDE; |
| 32 virtual GrContext* OffscreenGrContextForCompositorThread() OVERRIDE; |
| 33 virtual void DestroyOffscreenContext3dForCompositorThread() OVERRIDE; |
32 virtual scoped_ptr<InputHandler> createInputHandler() OVERRIDE; | 34 virtual scoped_ptr<InputHandler> createInputHandler() OVERRIDE; |
33 virtual void willCommit() OVERRIDE { } | 35 virtual void willCommit() OVERRIDE { } |
34 virtual void didCommit() OVERRIDE { } | 36 virtual void didCommit() OVERRIDE { } |
35 virtual void didCommitAndDrawFrame() OVERRIDE { } | 37 virtual void didCommitAndDrawFrame() OVERRIDE { } |
36 virtual void didCompleteSwapBuffers() OVERRIDE { } | 38 virtual void didCompleteSwapBuffers() OVERRIDE { } |
37 | 39 |
38 // Used only in the single-threaded path. | 40 // Used only in the single-threaded path. |
39 virtual void scheduleComposite() OVERRIDE { } | 41 virtual void scheduleComposite() OVERRIDE { } |
40 | 42 |
41 virtual scoped_ptr<FontAtlas> createFontAtlas() OVERRIDE; | 43 virtual scoped_ptr<FontAtlas> createFontAtlas() OVERRIDE; |
42 | 44 |
43 private: | 45 private: |
44 bool m_useSoftwareRendering; | 46 bool m_useSoftwareRendering; |
45 bool m_useDelegatingRenderer; | 47 bool m_useDelegatingRenderer; |
| 48 |
| 49 scoped_ptr<WebKit::WebGraphicsContext3D> m_offscreenContext3d; |
46 }; | 50 }; |
47 | 51 |
48 } // namespace cc | 52 } // namespace cc |
49 | 53 |
50 #endif // CC_TEST_FAKE_LAYER_TREE_HOST_CLIENT_H_ | 54 #endif // CC_TEST_FAKE_LAYER_TREE_HOST_CLIENT_H_ |
OLD | NEW |