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/gpu_command_buffer_stub.cc

Issue 23503038: Make using virtual contexts a workaround flag rather than cmdline (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comment Created 7 years, 3 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/browser/gpu/gpu_process_host.cc ('k') | content/public/common/content_switches.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 e86ef017d7713ffdacf8cf1d17767f7ad5b3af86..14ac92fbb4aaea84631b9b373d925550675816c5 100644
--- a/content/common/gpu/gpu_command_buffer_stub.cc
+++ b/content/common/gpu/gpu_command_buffer_stub.cc
@@ -22,7 +22,6 @@
#include "content/common/gpu/media/gpu_video_decode_accelerator.h"
#include "content/common/gpu/sync_point_manager.h"
#include "content/public/common/content_client.h"
-#include "content/public/common/content_switches.h"
#include "gpu/command_buffer/common/constants.h"
#include "gpu/command_buffer/common/gles2_cmd_utils.h"
#include "gpu/command_buffer/common/mailbox.h"
@@ -151,6 +150,9 @@ GpuCommandBufferStub::GpuCommandBufferStub(
stream_texture_manager,
true);
}
+
+ use_virtualized_gl_context_ |=
+ context_group_->feature_info()->workarounds().use_virtualized_gl_contexts;
}
GpuCommandBufferStub::~GpuCommandBufferStub() {
@@ -439,9 +441,7 @@ void GpuCommandBufferStub::OnInitialize(
}
scoped_refptr<gfx::GLContext> context;
- if ((CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableVirtualGLContexts) || use_virtualized_gl_context_) &&
- channel_->share_group()) {
+ if (use_virtualized_gl_context_ && channel_->share_group()) {
context = channel_->share_group()->GetSharedContext();
if (!context.get()) {
context = gfx::GLContext::CreateGLContext(
« no previous file with comments | « content/browser/gpu/gpu_process_host.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698