summaryrefslogtreecommitdiffstats
path: root/cc/test/layer_tree_test.cc
diff options
context:
space:
mode:
authorenne <enne@chromium.org>2014-12-10 13:32:09 -0800
committerCommit bot <commit-bot@chromium.org>2014-12-10 21:32:45 +0000
commit7f8fdded6b22322a245bf643454291a0c12079c8 (patch)
tree0f6e7c68d2f84a53fdcff1e93f4029a80c79d7ed /cc/test/layer_tree_test.cc
parentea4b5a8eb8f66713482ef7f4a8aca83886965440 (diff)
downloadchromium_src-7f8fdded6b22322a245bf643454291a0c12079c8.zip
chromium_src-7f8fdded6b22322a245bf643454291a0c12079c8.tar.gz
chromium_src-7f8fdded6b22322a245bf643454291a0c12079c8.tar.bz2
Move output surface fallback from cc to embedders
Having this in cc means that all embedders get this logic and API, even though only RenderWidgetCompositor and ui::Compositor use it. This also means that cc no longer has to be robust to null SetOutputSurface, which makes the API to embedders a bit more clear. Review URL: https://codereview.chromium.org/738983002 Cr-Commit-Position: refs/heads/master@{#307767}
Diffstat (limited to 'cc/test/layer_tree_test.cc')
-rw-r--r--cc/test/layer_tree_test.cc23
1 files changed, 10 insertions, 13 deletions
diff --git a/cc/test/layer_tree_test.cc b/cc/test/layer_tree_test.cc
index d6411ec..e5a5687 100644
--- a/cc/test/layer_tree_test.cc
+++ b/cc/test/layer_tree_test.cc
@@ -377,8 +377,8 @@ class LayerTreeHostClientForTesting : public LayerTreeHostClient,
top_controls_delta);
}
- void RequestNewOutputSurface(bool fallback) override {
- test_hooks_->RequestNewOutputSurface(fallback);
+ void RequestNewOutputSurface() override {
+ test_hooks_->RequestNewOutputSurface();
}
void DidInitializeOutputSurface() override {
@@ -391,6 +391,7 @@ class LayerTreeHostClientForTesting : public LayerTreeHostClient,
void DidFailToInitializeOutputSurface() override {
test_hooks_->DidFailToInitializeOutputSurface();
+ RequestNewOutputSurface();
}
void WillCommit() override { test_hooks_->WillCommit(); }
@@ -785,17 +786,14 @@ void LayerTreeTest::RunTestWithImplSidePainting() {
RunTest(true, false, true);
}
-void LayerTreeTest::RequestNewOutputSurface(bool fallback) {
- layer_tree_host_->SetOutputSurface(CreateOutputSurface(fallback));
+void LayerTreeTest::RequestNewOutputSurface() {
+ layer_tree_host_->SetOutputSurface(CreateOutputSurface());
}
-scoped_ptr<OutputSurface> LayerTreeTest::CreateOutputSurface(bool fallback) {
- scoped_ptr<FakeOutputSurface> output_surface =
- CreateFakeOutputSurface(fallback);
- if (output_surface) {
- DCHECK_EQ(delegating_renderer_,
- output_surface->capabilities().delegated_rendering);
- }
+scoped_ptr<OutputSurface> LayerTreeTest::CreateOutputSurface() {
+ scoped_ptr<FakeOutputSurface> output_surface = CreateFakeOutputSurface();
+ DCHECK_EQ(delegating_renderer_,
+ output_surface->capabilities().delegated_rendering);
output_surface_ = output_surface.get();
if (settings_.use_external_begin_frame_source &&
@@ -806,8 +804,7 @@ scoped_ptr<OutputSurface> LayerTreeTest::CreateOutputSurface(bool fallback) {
return output_surface.Pass();
}
-scoped_ptr<FakeOutputSurface> LayerTreeTest::CreateFakeOutputSurface(
- bool fallback) {
+scoped_ptr<FakeOutputSurface> LayerTreeTest::CreateFakeOutputSurface() {
if (delegating_renderer_)
return FakeOutputSurface::CreateDelegating3d();
else