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

Unified Diff: cc/trees/layer_tree_host_unittest_context.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: cc-blink-tests 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
Index: cc/trees/layer_tree_host_unittest_context.cc
diff --git a/cc/trees/layer_tree_host_unittest_context.cc b/cc/trees/layer_tree_host_unittest_context.cc
index 7e0a729119c0d347f5f0f2a6d7e2b9a960f85f95..c9a0291e2fa72659e6adaacc7db9570d0c54cf2a 100644
--- a/cc/trees/layer_tree_host_unittest_context.cc
+++ b/cc/trees/layer_tree_host_unittest_context.cc
@@ -96,10 +96,8 @@ class LayerTreeHostContextTest : public LayerTreeTest {
context3d_->set_have_extension_egl_image(true);
}
- if (delegating_renderer())
- return FakeOutputSurface::CreateDelegating3d(std::move(context3d));
- else
- return FakeOutputSurface::Create3d(std::move(context3d));
+ DCHECK(delegating_renderer());
+ return FakeOutputSurface::CreateDelegating3d(std::move(context3d));
}
DrawResult PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
@@ -780,48 +778,24 @@ class LayerTreeHostContextTestLostContextAndEvictTextures
};
TEST_F(LayerTreeHostContextTestLostContextAndEvictTextures,
- LoseAfterEvict_SingleThread_DirectRenderer) {
- lose_after_evict_ = true;
- RunTest(CompositorMode::SINGLE_THREADED, false);
-}
-
-TEST_F(LayerTreeHostContextTestLostContextAndEvictTextures,
LoseAfterEvict_SingleThread_DelegatingRenderer) {
lose_after_evict_ = true;
RunTest(CompositorMode::SINGLE_THREADED, true);
}
TEST_F(LayerTreeHostContextTestLostContextAndEvictTextures,
- LoseAfterEvict_MultiThread_DirectRenderer) {
- lose_after_evict_ = true;
- RunTest(CompositorMode::THREADED, false);
-}
-
-TEST_F(LayerTreeHostContextTestLostContextAndEvictTextures,
LoseAfterEvict_MultiThread_DelegatingRenderer) {
lose_after_evict_ = true;
RunTest(CompositorMode::THREADED, true);
}
TEST_F(LayerTreeHostContextTestLostContextAndEvictTextures,
- LoseBeforeEvict_SingleThread_DirectRenderer) {
- lose_after_evict_ = false;
- RunTest(CompositorMode::SINGLE_THREADED, false);
-}
-
-TEST_F(LayerTreeHostContextTestLostContextAndEvictTextures,
LoseBeforeEvict_SingleThread_DelegatingRenderer) {
lose_after_evict_ = false;
RunTest(CompositorMode::SINGLE_THREADED, true);
}
TEST_F(LayerTreeHostContextTestLostContextAndEvictTextures,
- LoseBeforeEvict_MultiThread_DirectRenderer) {
- lose_after_evict_ = false;
- RunTest(CompositorMode::THREADED, false);
-}
-
-TEST_F(LayerTreeHostContextTestLostContextAndEvictTextures,
LoseBeforeEvict_MultiThread_DelegatingRenderer) {
lose_after_evict_ = false;
RunTest(CompositorMode::THREADED, true);
@@ -903,7 +877,7 @@ class LayerTreeHostContextTestDontUseLostResources
LayerTreeHostContextTestDontUseLostResources() : lost_context_(false) {
context_should_support_io_surface_ = true;
- child_output_surface_ = FakeOutputSurface::Create3d();
+ child_output_surface_ = FakeOutputSurface::CreateDelegating3d();
child_output_surface_->BindToClient(&output_surface_client_);
shared_bitmap_manager_.reset(new TestSharedBitmapManager());
child_resource_provider_ = FakeResourceProvider::Create(

Powered by Google App Engine
This is Rietveld 408576698