Index: content/common/gpu/gpu_command_buffer_stub.cc |
diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc |
index 6ae480ba99ec3a2736eaa3392fbd09fee5059282..37b6738b4a719385d8d2b177cb46392b85e0ff1c 100644 |
--- a/content/common/gpu/gpu_command_buffer_stub.cc |
+++ b/content/common/gpu/gpu_command_buffer_stub.cc |
@@ -111,6 +111,7 @@ GpuCommandBufferStub::GpuCommandBufferStub( |
int32 surface_id, |
GpuWatchdog* watchdog, |
bool software, |
+ bool use_virtual_gl_context, |
const GURL& active_url) |
: channel_(channel), |
handle_(handle), |
@@ -122,6 +123,7 @@ GpuCommandBufferStub::GpuCommandBufferStub( |
route_id_(route_id), |
surface_id_(surface_id), |
software_(software), |
+ use_virtual_gl_context_(use_virtual_gl_context), |
last_flush_count_(0), |
last_memory_allocation_valid_(false), |
parent_stub_for_initialization_(), |
@@ -435,8 +437,9 @@ void GpuCommandBufferStub::OnInitialize( |
} |
scoped_refptr<gfx::GLContext> context; |
- if (CommandLine::ForCurrentProcess()->HasSwitch( |
- switches::kEnableVirtualGLContexts) && channel_->share_group()) { |
+ if ((CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kEnableVirtualGLContexts) || use_virtual_gl_context_) && |
+ channel_->share_group()) { |
context = channel_->share_group()->GetSharedContext(); |
if (!context) { |
context = gfx::GLContext::CreateGLContext( |