Index: cc/test/layer_tree_pixel_test.cc |
diff --git a/cc/test/layer_tree_pixel_test.cc b/cc/test/layer_tree_pixel_test.cc |
index 871573ea05371d3365f5759741265e0303f02753..ce021b94a6d4bdc60f6b6911345a59136fff685e 100644 |
--- a/cc/test/layer_tree_pixel_test.cc |
+++ b/cc/test/layer_tree_pixel_test.cc |
@@ -69,13 +69,16 @@ LayerTreePixelTest::CreateDisplayOutputSurfaceOnThread( |
scoped_refptr<ContextProvider> compositor_context_provider) { |
std::unique_ptr<PixelTestOutputSurface> display_output_surface; |
if (test_type_ == PIXEL_TEST_GL) { |
+ // Pixel tests use a separate context for the Display to more closely |
+ // mimic texture transport from the renderer process to the Display |
+ // compositor. |
+ auto display_context_provider = |
+ make_scoped_refptr(new TestInProcessContextProvider(nullptr)); |
+ display_context_provider->BindToCurrentThread(); |
+ |
bool flipped_output_surface = false; |
display_output_surface = base::MakeUnique<PixelTestOutputSurface>( |
- // Pixel tests use a separate context for the Display to more closely |
- // mimic texture transport from the renderer process to the Display |
- // compositor. |
- make_scoped_refptr(new TestInProcessContextProvider(nullptr)), |
- flipped_output_surface); |
+ std::move(display_context_provider), flipped_output_surface); |
} else { |
display_output_surface = base::MakeUnique<PixelTestOutputSurface>( |
base::MakeUnique<SoftwareOutputDevice>()); |