Index: content/test/layouttest_support.cc |
diff --git a/content/test/layouttest_support.cc b/content/test/layouttest_support.cc |
index 1e4f279135f70ad6c2d9baf66abff723e39a74f2..df166e20fcd1eef1e05bad656185ae75161da40d 100644 |
--- a/content/test/layouttest_support.cc |
+++ b/content/test/layouttest_support.cc |
@@ -387,17 +387,19 @@ class LayoutTestDependenciesImpl : public LayoutTestDependencies, |
const bool automatic_flushes = false; |
const bool support_locking = false; |
+ auto context_provider = make_scoped_refptr(new ContextProviderCommandBuffer( |
+ gpu_channel_, gpu::GPU_STREAM_DEFAULT, gpu::GpuStreamPriority::NORMAL, |
+ gpu::kNullSurfaceHandle, |
+ GURL("chrome://gpu/" |
+ "LayoutTestDependenciesImpl::CreateOutputSurface"), |
+ automatic_flushes, support_locking, gpu::SharedMemoryLimits(), |
+ attributes, nullptr, |
+ command_buffer_metrics::OFFSCREEN_CONTEXT_FOR_TESTING)); |
+ context_provider->BindToCurrentThread(); |
+ |
bool flipped_output_surface = false; |
return base::MakeUnique<cc::PixelTestOutputSurface>( |
- make_scoped_refptr(new ContextProviderCommandBuffer( |
- gpu_channel_, gpu::GPU_STREAM_DEFAULT, |
- gpu::GpuStreamPriority::NORMAL, gpu::kNullSurfaceHandle, |
- GURL("chrome://gpu/" |
- "LayoutTestDependenciesImpl::CreateOutputSurface"), |
- automatic_flushes, support_locking, gpu::SharedMemoryLimits(), |
- attributes, nullptr, |
- command_buffer_metrics::OFFSCREEN_CONTEXT_FOR_TESTING)), |
- flipped_output_surface); |
+ std::move(context_provider), flipped_output_surface); |
} |
void DisplayReceivedCompositorFrame( |
const cc::CompositorFrame& frame) override {} |