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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 1916923004: Request context sharing via content::ContextProviderCommandBuffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sharegroup: . Created 4 years, 8 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 | « content/renderer/render_thread_impl.h ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index fdba7c596ae48e0f141bcbae111a34a971994741..a42f42ef859512509b10e6d79f5812c4162277bd 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -447,8 +447,7 @@ void StringToUintVector(const std::string& str, std::vector<unsigned>* vector) {
}
std::unique_ptr<WebGraphicsContext3DCommandBufferImpl> CreateOffscreenContext(
- scoped_refptr<gpu::GpuChannelHost> gpu_channel_host,
- bool share_resources) {
+ scoped_refptr<gpu::GpuChannelHost> gpu_channel_host) {
DCHECK(gpu_channel_host);
// This is used to create a few different offscreen contexts:
// - The shared main thread context (offscreen) used by blink for canvas.
@@ -468,7 +467,7 @@ std::unique_ptr<WebGraphicsContext3DCommandBufferImpl> CreateOffscreenContext(
gpu::kNullSurfaceHandle,
GURL("chrome://gpu/RenderThreadImpl::CreateOffscreenContext3d"),
gpu_channel_host.get(), attributes, gfx::PreferIntegratedGpu,
- share_resources, automatic_flushes, nullptr));
+ automatic_flushes));
}
} // namespace
@@ -1483,7 +1482,7 @@ media::GpuVideoAcceleratorFactories* RenderThreadImpl::GetGpuFactories() {
return nullptr;
}
-scoped_refptr<cc_blink::ContextProviderWebContext>
+scoped_refptr<ContextProviderCommandBuffer>
RenderThreadImpl::SharedMainThreadContextProvider() {
DCHECK(IsMainThread());
if (shared_main_thread_contexts_ &&
@@ -1498,10 +1497,9 @@ RenderThreadImpl::SharedMainThreadContextProvider() {
return nullptr;
}
- constexpr bool share_resources = false;
shared_main_thread_contexts_ = new ContextProviderCommandBuffer(
- CreateOffscreenContext(std::move(gpu_channel_host), share_resources),
- gpu::SharedMemoryLimits(), RENDERER_MAINTHREAD_CONTEXT);
+ CreateOffscreenContext(std::move(gpu_channel_host)),
+ gpu::SharedMemoryLimits(), nullptr, RENDERER_MAINTHREAD_CONTEXT);
if (!shared_main_thread_contexts_->BindToCurrentThread())
shared_main_thread_contexts_ = nullptr;
return shared_main_thread_contexts_;
@@ -2010,10 +2008,9 @@ RenderThreadImpl::SharedWorkerContextProvider() {
return shared_worker_context_provider_;
}
- constexpr bool share_resources = true;
shared_worker_context_provider_ = new ContextProviderCommandBuffer(
- CreateOffscreenContext(std::move(gpu_channel_host), share_resources),
- gpu::SharedMemoryLimits(), RENDER_WORKER_CONTEXT);
+ CreateOffscreenContext(std::move(gpu_channel_host)),
+ gpu::SharedMemoryLimits(), nullptr, RENDER_WORKER_CONTEXT);
if (!shared_worker_context_provider_->BindToCurrentThread())
shared_worker_context_provider_ = nullptr;
if (shared_worker_context_provider_)
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698