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

Unified Diff: content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.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/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
diff --git a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
index 59829714ae2e8de1b950893ecb86aa4129158f1b..afdfc5fa8c08bb14e0660464e3ea680c65609dca 100644
--- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
+++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
@@ -44,12 +44,16 @@ WebGraphicsContext3DCommandBufferImpl::WebGraphicsContext3DCommandBufferImpl(
const GURL& active_url,
scoped_refptr<gpu::GpuChannelHost> host,
gfx::GpuPreference gpu_preference,
- bool automatic_flushes)
- : automatic_flushes_(automatic_flushes),
- host_(std::move(host)),
+ bool automatic_flushes,
+ int32_t stream_id,
+ gpu::GpuStreamPriority stream_priority)
+ : host_(std::move(host)),
surface_handle_(surface_handle),
active_url_(active_url),
gpu_preference_(gpu_preference),
+ automatic_flushes_(automatic_flushes),
+ stream_id_(stream_id),
+ stream_priority_(stream_priority),
weak_ptr_factory_(this) {
DCHECK(host_);
}
@@ -114,10 +118,8 @@ bool WebGraphicsContext3DCommandBufferImpl::InitializeCommandBuffer(
// Create a proxy to a command buffer in the GPU process.
command_buffer_ = host_->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_);
if (!command_buffer_) {
DLOG(ERROR) << "GpuChannelHost failed to create command buffer.";

Powered by Google App Engine
This is Rietveld 408576698