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

Unified Diff: cc/test/layer_tree_test.cc

Issue 2140383005: cc: Decouple LayerTreeTests from FakeOutputSurface expectations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@novirtualswapbuffers
Patch Set: layertreetest-outputsurface: more-more-more-android 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/trees/layer_tree_host_unittest.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 c72d1f283d1a0299057328f1c9787dc075742244..c272fde5a92294064157ce6722008efd84b005ce 100644
--- a/cc/test/layer_tree_test.cc
+++ b/cc/test/layer_tree_test.cc
@@ -500,8 +500,7 @@ class LayerTreeHostForTesting : public LayerTreeHost {
};
LayerTreeTest::LayerTreeTest()
- : output_surface_(nullptr),
- external_begin_frame_source_(nullptr),
+ : external_begin_frame_source_(nullptr),
remote_proto_channel_bridge_(this),
image_serialization_processor_(
base::WrapUnique(new FakeImageSerializationProcessor)),
@@ -905,32 +904,16 @@ void LayerTreeTest::RunTest(CompositorMode mode, bool delegating_renderer) {
}
void LayerTreeTest::RequestNewOutputSurface() {
- SetOutputSurfaceOnLayerTreeHost(CreateOutputSurface());
-}
-
-std::unique_ptr<OutputSurface> LayerTreeTest::CreateOutputSurface() {
- std::unique_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 &&
settings_.wait_for_beginframe_interval) {
DCHECK(external_begin_frame_source_);
}
- return std::move(output_surface);
-}
-
-std::unique_ptr<FakeOutputSurface> LayerTreeTest::CreateFakeOutputSurface() {
- if (delegating_renderer_)
- return FakeOutputSurface::CreateDelegating3d();
- else
- return FakeOutputSurface::Create3d();
+ SetOutputSurfaceOnLayerTreeHost(CreateOutputSurface());
}
-TestWebGraphicsContext3D* LayerTreeTest::TestContext() {
- return static_cast<TestContextProvider*>(output_surface_->context_provider())
- ->TestContext3d();
+std::unique_ptr<OutputSurface> LayerTreeTest::CreateOutputSurface() {
+ return delegating_renderer_ ? FakeOutputSurface::CreateDelegating3d()
+ : FakeOutputSurface::Create3d();
}
void LayerTreeTest::DestroyLayerTreeHost() {
« no previous file with comments | « cc/test/layer_tree_test.h ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698