Index: content/renderer/render_widget.cc |
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc |
index fb309d7b86e37e32daf668e308166df76f4c2284..3f5ea076bf9dfdedbd62cb9b5258dd722d9452ef 100644 |
--- a/content/renderer/render_widget.cc |
+++ b/content/renderer/render_widget.cc |
@@ -777,13 +777,19 @@ std::unique_ptr<cc::OutputSurface> RenderWidget::CreateOutputSurface( |
constexpr bool automatic_flushes = false; |
- // The compositor context shares resources with the worker context. |
- scoped_refptr<ContextProviderCommandBuffer> context_provider( |
- new ContextProviderCommandBuffer( |
- std::move(gpu_channel_host), gpu::kNullSurfaceHandle, |
- GetURLForGraphicsContext3D(), gfx::PreferIntegratedGpu, |
- automatic_flushes, limits, attributes, worker_context_provider.get(), |
- command_buffer_metrics::RENDER_COMPOSITOR_CONTEXT)); |
+ // The compositor context shares resources with the worker context unless |
+ // the worker is async. |
+ ContextProviderCommandBuffer* share_context = worker_context_provider.get(); |
+ if (compositor_deps_->IsAsyncWorkerContextEnabled()) |
+ share_context = nullptr; |
+ |
+ scoped_refptr<ContextProviderCommandBuffer> context_provider( |
+ new ContextProviderCommandBuffer( |
+ std::move(gpu_channel_host), gpu::GPU_STREAM_DEFAULT, |
+ gpu::GpuStreamPriority::NORMAL, gpu::kNullSurfaceHandle, |
+ GetURLForGraphicsContext3D(), gfx::PreferIntegratedGpu, |
+ automatic_flushes, limits, attributes, share_context, |
+ command_buffer_metrics::RENDER_COMPOSITOR_CONTEXT)); |
#if defined(OS_ANDROID) |
if (RenderThreadImpl::current()->sync_compositor_message_filter()) { |