summaryrefslogtreecommitdiffstats
path: root/cc/layers/layer_unittest.cc
diff options
context:
space:
mode:
authorjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-07 05:01:32 +0000
committerjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-07 05:01:32 +0000
commit943528e092b0a1c242c75af60c7b08385908e954 (patch)
tree02904b3b722389bbe339cfd4a892c57a65016fbd /cc/layers/layer_unittest.cc
parent341acce17f767566e8602902055a29996e85ff64 (diff)
downloadchromium_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/layers/layer_unittest.cc')
-rw-r--r--cc/layers/layer_unittest.cc15
1 files changed, 10 insertions, 5 deletions
diff --git a/cc/layers/layer_unittest.cc b/cc/layers/layer_unittest.cc
index c66eb85..0414acb 100644
--- a/cc/layers/layer_unittest.cc
+++ b/cc/layers/layer_unittest.cc
@@ -38,9 +38,9 @@ namespace {
class MockLayerTreeHost : public LayerTreeHost {
public:
- explicit MockLayerTreeHost(LayerTreeHostClient* client)
+ explicit MockLayerTreeHost(FakeLayerTreeHostClient* client)
: LayerTreeHost(client, NULL, LayerTreeSettings()) {
- Initialize(NULL);
+ InitializeSingleThreaded(client);
}
MOCK_METHOD0(SetNeedsCommit, void());
@@ -803,12 +803,17 @@ class LayerTreeHostFactory {
: client_(FakeLayerTreeHostClient::DIRECT_3D) {}
scoped_ptr<LayerTreeHost> Create() {
- return LayerTreeHost::Create(&client_, NULL, LayerTreeSettings(), NULL)
- .Pass();
+ return LayerTreeHost::CreateSingleThreaded(&client_,
+ &client_,
+ NULL,
+ LayerTreeSettings()).Pass();
}
scoped_ptr<LayerTreeHost> Create(LayerTreeSettings settings) {
- return LayerTreeHost::Create(&client_, NULL, settings, NULL).Pass();
+ return LayerTreeHost::CreateSingleThreaded(&client_,
+ &client_,
+ NULL,
+ settings).Pass();
}
private: