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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 1903863003: Remove the renderer shared context from the compositor share group. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: renderer-share: bool 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 | « no previous file | no next file » | 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 ade8c17bc6dd770627f5e8a6e71933bdcc68c5a6..19bf4712bdc55937edcc37065404fbec113c16b8 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -447,7 +447,8 @@ void StringToUintVector(const std::string& str, std::vector<unsigned>* vector) {
}
std::unique_ptr<WebGraphicsContext3DCommandBufferImpl> CreateOffscreenContext(
- scoped_refptr<gpu::GpuChannelHost> gpu_channel_host) {
+ scoped_refptr<gpu::GpuChannelHost> gpu_channel_host,
+ bool share_resources) {
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.
@@ -462,8 +463,7 @@ std::unique_ptr<WebGraphicsContext3DCommandBufferImpl> CreateOffscreenContext(
attributes.sample_buffers = 0;
attributes.bind_generates_resource = false;
attributes.lose_context_when_out_of_memory = true;
- bool share_resources = true;
- bool automatic_flushes = false;
+ constexpr bool automatic_flushes = false;
return base::WrapUnique(new WebGraphicsContext3DCommandBufferImpl(
gpu::kNullSurfaceHandle,
GURL("chrome://gpu/RenderThreadImpl::CreateOffscreenContext3d"),
@@ -1506,8 +1506,9 @@ RenderThreadImpl::SharedMainThreadContextProvider() {
return nullptr;
}
+ constexpr bool share_resources = false;
shared_main_thread_contexts_ = new ContextProviderCommandBuffer(
- CreateOffscreenContext(std::move(gpu_channel_host)),
+ CreateOffscreenContext(std::move(gpu_channel_host), share_resources),
gpu::SharedMemoryLimits(), RENDERER_MAINTHREAD_CONTEXT);
if (!shared_main_thread_contexts_->BindToCurrentThread())
shared_main_thread_contexts_ = nullptr;
@@ -2021,8 +2022,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)),
+ CreateOffscreenContext(std::move(gpu_channel_host), share_resources),
gpu::SharedMemoryLimits(), RENDER_WORKER_CONTEXT);
if (!shared_worker_context_provider_->BindToCurrentThread())
shared_worker_context_provider_ = nullptr;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698