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

Unified Diff: content/common/gpu/client/context_provider_command_buffer.cc

Issue 1949023005: gpu: Add flag for enabling asynchronous worker context. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase fix 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/common/gpu/client/context_provider_command_buffer.cc
diff --git a/content/common/gpu/client/context_provider_command_buffer.cc b/content/common/gpu/client/context_provider_command_buffer.cc
index 7c5e7fb64a50b6b3fa0544c589f53e03835c87e3..8bc3a03ad3c4a8e2db58be8e38a5594233e1873d 100644
--- a/content/common/gpu/client/context_provider_command_buffer.cc
+++ b/content/common/gpu/client/context_provider_command_buffer.cc
@@ -54,6 +54,8 @@ ContextProviderCommandBuffer::SharedProviders::~SharedProviders() = default;
ContextProviderCommandBuffer::ContextProviderCommandBuffer(
scoped_refptr<gpu::GpuChannelHost> channel,
+ int32_t stream_id,
+ gpu::GpuStreamPriority stream_priority,
gpu::SurfaceHandle surface_handle,
const GURL& active_url,
gfx::GpuPreference gpu_preference,
@@ -62,7 +64,9 @@ ContextProviderCommandBuffer::ContextProviderCommandBuffer(
const gpu::gles2::ContextCreationAttribHelper& attributes,
ContextProviderCommandBuffer* shared_context_provider,
command_buffer_metrics::ContextType type)
- : surface_handle_(surface_handle),
+ : stream_id_(stream_id),
+ stream_priority_(stream_priority),
+ surface_handle_(surface_handle),
active_url_(active_url),
gpu_preference_(gpu_preference),
automatic_flushes_(automatic_flushes),
@@ -142,10 +146,8 @@ bool ContextProviderCommandBuffer::BindToCurrentThread() {
// This command buffer is a client-side proxy to the command buffer in the
// GPU process.
command_buffer_ = channel_->CreateCommandBuffer(
- surface_handle_, gfx::Size(), shared_command_buffer,
- gpu::GpuChannelHost::kDefaultStreamId,
- gpu::GpuChannelHost::kDefaultStreamPriority, serialized_attributes,
- active_url_, gpu_preference_);
+ surface_handle_, gfx::Size(), shared_command_buffer, stream_id_,
+ stream_priority_, serialized_attributes, active_url_, gpu_preference_);
// The command buffer takes ownership of the |channel_|, so no need to keep
// a reference around here.
channel_ = nullptr;
« no previous file with comments | « content/common/gpu/client/context_provider_command_buffer.h ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698