Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1414)

Unified Diff: cc/test/layer_tree_test.cc

Issue 738983002: Move output surface fallback from cc to embedders (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/test/layer_tree_test.cc
diff --git a/cc/test/layer_tree_test.cc b/cc/test/layer_tree_test.cc
index fb16917796ccaa16a07d6431dd5671f145445025..1c6e841383605c5506bf0d7ea54edba14e7269c8 100644
--- a/cc/test/layer_tree_test.cc
+++ b/cc/test/layer_tree_test.cc
@@ -372,8 +372,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 {
@@ -386,6 +386,7 @@ class LayerTreeHostClientForTesting : public LayerTreeHostClient,
void DidFailToInitializeOutputSurface() override {
test_hooks_->DidFailToInitializeOutputSurface();
+ RequestNewOutputSurface();
}
void WillCommit() override { test_hooks_->WillCommit(); }
@@ -780,17 +781,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 &&
@@ -801,8 +799,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

Powered by Google App Engine
This is Rietveld 408576698