summaryrefslogtreecommitdiffstats
path: root/cc/test/fake_layer_tree_host_client.h
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-19 09:48:09 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-19 09:48:09 +0000
commit408b5e2ed7d842a073911265fcdfe88d0d98e5b1 (patch)
treef0558c6a7182dfd138e0d73cf970815fe52eebde /cc/test/fake_layer_tree_host_client.h
parentde82be2276d21bbe59a4ae9b25f7c7b738fafab4 (diff)
downloadchromium_src-408b5e2ed7d842a073911265fcdfe88d0d98e5b1.zip
chromium_src-408b5e2ed7d842a073911265fcdfe88d0d98e5b1.tar.gz
chromium_src-408b5e2ed7d842a073911265fcdfe88d0d98e5b1.tar.bz2
cc: Chromify LayerTreeHostClient.
Style-only change. Fix LayerTreeHostClient and FakeLayer(Impl)TreeHostClient to use chromium style. And rename LayerImplTreeHostClient to LayerTreeHostClient like it should be. R=enne Review URL: https://chromiumcodereview.appspot.com/12494030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188968 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/fake_layer_tree_host_client.h')
-rw-r--r--cc/test/fake_layer_tree_host_client.h71
1 files changed, 40 insertions, 31 deletions
diff --git a/cc/test/fake_layer_tree_host_client.h b/cc/test/fake_layer_tree_host_client.h
index a7899a2..240b450 100644
--- a/cc/test/fake_layer_tree_host_client.h
+++ b/cc/test/fake_layer_tree_host_client.h
@@ -13,37 +13,46 @@
namespace cc {
-class FakeLayerImplTreeHostClient : public LayerTreeHostClient {
-public:
- FakeLayerImplTreeHostClient(bool useSoftwareRendering = false, bool useDelegatingRenderer = false);
- virtual ~FakeLayerImplTreeHostClient();
-
- virtual void willBeginFrame() OVERRIDE { }
- virtual void didBeginFrame() OVERRIDE { }
- virtual void animate(double monotonicFrameBeginTime) OVERRIDE { }
- virtual void layout() OVERRIDE { }
- virtual void applyScrollAndScale(gfx::Vector2d scrollDelta, float pageScale) OVERRIDE { }
-
- virtual scoped_ptr<OutputSurface> createOutputSurface() OVERRIDE;
- virtual void didRecreateOutputSurface(bool success) OVERRIDE { }
- virtual scoped_ptr<InputHandler> createInputHandler() OVERRIDE;
- virtual void willCommit() OVERRIDE { }
- virtual void didCommit() OVERRIDE { }
- virtual void didCommitAndDrawFrame() OVERRIDE { }
- virtual void didCompleteSwapBuffers() OVERRIDE { }
-
- // Used only in the single-threaded path.
- virtual void scheduleComposite() OVERRIDE { }
-
- virtual scoped_refptr<cc::ContextProvider> OffscreenContextProviderForMainThread() OVERRIDE;
- virtual scoped_refptr<cc::ContextProvider> OffscreenContextProviderForCompositorThread() OVERRIDE;
-
-private:
- bool m_useSoftwareRendering;
- bool m_useDelegatingRenderer;
-
- scoped_refptr<FakeContextProvider> m_mainThreadContexts;
- scoped_refptr<FakeContextProvider> m_compositorThreadContexts;
+class FakeLayerTreeHostClient : public LayerTreeHostClient {
+ public:
+ enum RendererOptions {
+ DIRECT_3D,
+ DIRECT_SOFTWARE,
+ DELEGATED_3D,
+ DELEGATED_SOFTWARE
+ };
+ FakeLayerTreeHostClient(RendererOptions options);
+ virtual ~FakeLayerTreeHostClient();
+
+ virtual void WillBeginFrame() OVERRIDE {}
+ virtual void DidBeginFrame() OVERRIDE {}
+ virtual void Animate(double frame_begin_time) OVERRIDE {}
+ virtual void Layout() OVERRIDE {}
+ virtual void ApplyScrollAndScale(gfx::Vector2d scroll_delta,
+ float page_scale) OVERRIDE {}
+
+ virtual scoped_ptr<OutputSurface> CreateOutputSurface() OVERRIDE;
+ virtual void DidRecreateOutputSurface(bool success) OVERRIDE {}
+ virtual scoped_ptr<InputHandler> CreateInputHandler() OVERRIDE;
+ virtual void WillCommit() OVERRIDE {}
+ virtual void DidCommit() OVERRIDE {}
+ virtual void DidCommitAndDrawFrame() OVERRIDE {}
+ virtual void DidCompleteSwapBuffers() OVERRIDE {}
+
+ // Used only in the single-threaded path.
+ virtual void ScheduleComposite() OVERRIDE {}
+
+ virtual scoped_refptr<cc::ContextProvider>
+ OffscreenContextProviderForMainThread() OVERRIDE;
+ virtual scoped_refptr<cc::ContextProvider>
+ OffscreenContextProviderForCompositorThread() OVERRIDE;
+
+ private:
+ bool use_software_rendering_;
+ bool use_delegating_renderer_;
+
+ scoped_refptr<FakeContextProvider> main_thread_contexts_;
+ scoped_refptr<FakeContextProvider> compositor_thread_contexts_;
};
} // namespace cc