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

Unified Diff: content/renderer/render_widget.cc

Issue 1949023005: gpu: Add flag for enabling asynchronous worker context. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
Index: content/renderer/render_widget.cc
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 727717eea390b55c1de71d01668d41766d9afbcc..b25a36d8c1ef11ded3466863ab8fe334d3526cf8 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -775,12 +775,19 @@ std::unique_ptr<cc::OutputSurface> RenderWidget::CreateOutputSurface(
bool automatic_flushes = false;
- // The compositor context shares resources with the worker context.
+ // The compositor context shares resources with the worker context unless
+ // the worker is async.
+ ContextProviderCommandBuffer* share_context = worker_context_provider.get();
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableGpuAsyncWorkerContext)) {
+ share_context = nullptr;
+ }
context_provider = new ContextProviderCommandBuffer(
base::WrapUnique(new content::WebGraphicsContext3DCommandBufferImpl(
gpu::kNullSurfaceHandle, GetURLForGraphicsContext3D(),
std::move(gpu_channel_host), gfx::PreferIntegratedGpu,
- automatic_flushes)),
+ automatic_flushes, gpu::GPU_STREAM_DEFAULT,
+ gpu::GpuStreamPriority::NORMAL)),
limits, attributes, worker_context_provider.get(),
command_buffer_metrics::RENDER_COMPOSITOR_CONTEXT);

Powered by Google App Engine
This is Rietveld 408576698