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

Unified Diff: content/common/gpu/gpu_command_buffer_stub.cc

Issue 13647014: Attach flag to use virtual context for WebGraphicsContext3D (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove printf... Created 7 years, 9 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/common/gpu/gpu_command_buffer_stub.h ('k') | content/common/gpu/gpu_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « content/common/gpu/gpu_command_buffer_stub.h ('k') | content/common/gpu/gpu_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698