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

Unified Diff: cc/test/layer_tree_test.cc

Issue 2171143002: cc: Get rid of non-delegated rendering in most cc unit tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@killdirecttests
Patch Set: fakeoutputsurface: no-constructor Created 4 years, 5 months 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
« no previous file with comments | « cc/test/layer_tree_test.h ('k') | cc/test/test_layer_tree_host_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/layer_tree_test.cc
diff --git a/cc/test/layer_tree_test.cc b/cc/test/layer_tree_test.cc
index daeb5c3cbbaf73dd307a57bcfbd4933d07fba256..f2c5265fc4a994e0d9628aa7969f5f083ec337f1 100644
--- a/cc/test/layer_tree_test.cc
+++ b/cc/test/layer_tree_test.cc
@@ -854,8 +854,14 @@ void LayerTreeTest::RequestNewOutputSurface() {
}
std::unique_ptr<OutputSurface> LayerTreeTest::CreateOutputSurface() {
- return delegating_renderer_ ? FakeOutputSurface::CreateDelegating3d()
- : FakeOutputSurface::Create3d();
+ if (delegating_renderer_)
+ return FakeOutputSurface::CreateDelegating3d();
+
+ // Make a worker context in a non-delegating OutputSurface. This is an
+ // exceptional situation for these tests as they put a non-delegating
+ // OutputSurface into the LayerTreeHost.
+ return FakeOutputSurface::Create3d(TestContextProvider::Create(),
+ TestContextProvider::CreateWorker());
}
void LayerTreeTest::DestroyLayerTreeHost() {
« no previous file with comments | « cc/test/layer_tree_test.h ('k') | cc/test/test_layer_tree_host_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698