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

Unified Diff: cc/test/layer_tree_test.cc

Issue 2445553002: cc: Make OutputSurface entirely live on one thread in tests. (Closed)
Patch Set: osonthread: fixcontextdeleteintest Created 4 years, 2 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_compositor_frame_sink.h » ('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 4f52a749c4b299a6bbfe016ee8936a88b119bd90..989e77645cca13e8c773ae7b342db0515e685336 100644
--- a/cc/test/layer_tree_test.cc
+++ b/cc/test/layer_tree_test.cc
@@ -493,6 +493,11 @@ class LayerTreeTestCompositorFrameSinkClient
: hooks_(hooks) {}
// TestCompositorFrameSinkClient implementation.
+ std::unique_ptr<OutputSurface> CreateDisplayOutputSurface(
+ scoped_refptr<ContextProvider> compositor_context_provider) override {
+ return hooks_->CreateDisplayOutputSurfaceOnThread(
+ std::move(compositor_context_provider));
+ }
void DisplayReceivedCompositorFrame(const CompositorFrame& frame) override {
hooks_->DisplayReceivedCompositorFrameOnThread(frame);
}
@@ -872,8 +877,7 @@ void LayerTreeTest::RequestNewCompositorFrameSink() {
auto compositor_frame_sink = CreateCompositorFrameSink(
std::move(shared_context_provider), std::move(worker_context_provider));
compositor_frame_sink->SetClient(compositor_frame_sink_client_.get());
-
- layer_tree_host_->SetCompositorFrameSink(std::move(compositor_frame_sink));
+ layer_tree_host_->SetCompositorFrameSink(std::move(compositor_frame_sink));
}
std::unique_ptr<TestCompositorFrameSink>
@@ -888,13 +892,13 @@ LayerTreeTest::CreateCompositorFrameSink(
bool force_disable_reclaim_resources = true;
return base::MakeUnique<TestCompositorFrameSink>(
compositor_context_provider, std::move(worker_context_provider),
- CreateDisplayOutputSurface(compositor_context_provider),
shared_bitmap_manager(), gpu_memory_buffer_manager(),
layer_tree_host()->GetSettings().renderer_settings, impl_task_runner_,
synchronous_composite, force_disable_reclaim_resources);
}
-std::unique_ptr<OutputSurface> LayerTreeTest::CreateDisplayOutputSurface(
+std::unique_ptr<OutputSurface>
+LayerTreeTest::CreateDisplayOutputSurfaceOnThread(
scoped_refptr<ContextProvider> compositor_context_provider) {
// By default the Display shares a context with the LayerTreeHostImpl.
return FakeOutputSurface::Create3d(std::move(compositor_context_provider));
« no previous file with comments | « cc/test/layer_tree_test.h ('k') | cc/test/test_compositor_frame_sink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698