diff options
author | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-07 05:01:32 +0000 |
---|---|---|
committer | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-07 05:01:32 +0000 |
commit | 943528e092b0a1c242c75af60c7b08385908e954 (patch) | |
tree | 02904b3b722389bbe339cfd4a892c57a65016fbd /cc/test/fake_layer_tree_host_client.h | |
parent | 341acce17f767566e8602902055a29996e85ff64 (diff) | |
download | chromium_src-943528e092b0a1c242c75af60c7b08385908e954.zip chromium_src-943528e092b0a1c242c75af60c7b08385908e954.tar.gz chromium_src-943528e092b0a1c242c75af60c7b08385908e954.tar.bz2 |
Introduce separate client and init path for single-threaded cc
The chromium compositor can be used in either a single-threaded fashion
or multi-threaded. The requirements, APIs and responsibilities of the embedder
are different for these two modes. Some users of cc only use one path
or the other. This adds a separate client interface and initialization
path for code that only uses the single threaded path.
Having a dedicated client for the single threaded path will make it
possible to get rid of the WebGraphicsContext3DSwapBuffersClient which
will then make it easier to break cc's dependency on WGC3D.
R=piman
BUG=181120
Review URL: https://codereview.chromium.org/61823008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233483 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.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/cc/test/fake_layer_tree_host_client.h b/cc/test/fake_layer_tree_host_client.h index 0bad7ad..8b60f50 100644 --- a/cc/test/fake_layer_tree_host_client.h +++ b/cc/test/fake_layer_tree_host_client.h @@ -8,12 +8,14 @@ #include "base/memory/scoped_ptr.h" #include "cc/input/input_handler.h" #include "cc/test/test_context_provider.h" -#include "cc/trees/layer_tree_host.h" +#include "cc/trees/layer_tree_host_client.h" +#include "cc/trees/layer_tree_host_single_thread_client.h" namespace cc { class OutputSurface; -class FakeLayerTreeHostClient : public LayerTreeHostClient { +class FakeLayerTreeHostClient : public LayerTreeHostClient, + public LayerTreeHostSingleThreadClient { public: enum RendererOptions { DIRECT_3D, @@ -24,6 +26,7 @@ class FakeLayerTreeHostClient : public LayerTreeHostClient { explicit FakeLayerTreeHostClient(RendererOptions options); virtual ~FakeLayerTreeHostClient(); + // LayerTreeHostClient implementation. virtual void WillBeginMainFrame() OVERRIDE {} virtual void DidBeginMainFrame() OVERRIDE {} virtual void Animate(double frame_begin_time) OVERRIDE {} @@ -37,11 +40,12 @@ class FakeLayerTreeHostClient : public LayerTreeHostClient { virtual void DidCommit() OVERRIDE {} virtual void DidCommitAndDrawFrame() OVERRIDE {} virtual void DidCompleteSwapBuffers() OVERRIDE {} + virtual scoped_refptr<ContextProvider> OffscreenContextProvider() OVERRIDE; - // Used only in the single-threaded path. + // LayerTreeHostSingleThreadClient implementation. virtual void ScheduleComposite() OVERRIDE {} - - virtual scoped_refptr<ContextProvider> OffscreenContextProvider() OVERRIDE; + virtual void DidPostSwapBuffers() OVERRIDE {} + virtual void DidAbortSwapBuffers() OVERRIDE {} private: bool use_software_rendering_; |