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

Unified Diff: content/gpu/gpu_info_collector_linux.cc

Issue 7530008: Add --gpu-no-context-lost commandline switch. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 5 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') | ui/gfx/gl/gl_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/gpu/gpu_info_collector_linux.cc
===================================================================
--- content/gpu/gpu_info_collector_linux.cc (revision 94381)
+++ content/gpu/gpu_info_collector_linux.cc (working copy)
@@ -7,6 +7,7 @@
#include <dlfcn.h>
#include <vector>
+#include "base/command_line.h"
#include "base/file_util.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
@@ -17,6 +18,7 @@
#include "ui/gfx/gl/gl_bindings.h"
#include "ui/gfx/gl/gl_context.h"
#include "ui/gfx/gl/gl_implementation.h"
+#include "ui/gfx/gl/gl_switches.h"
namespace {
@@ -192,10 +194,16 @@
bool CollectGraphicsInfo(GPUInfo* gpu_info) {
DCHECK(gpu_info);
- // TODO(zmo): need to consider the case where we are running on top of
- // desktop GL and GL_ARB_robustness extension is available.
- gpu_info->can_lose_context =
- (gfx::GetGLImplementation() == gfx::kGLImplementationEGLGLES2);
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kGpuNoContextLost)) {
+ gpu_info->can_lose_context = false;
+ } else {
+ // TODO(zmo): need to consider the case where we are running on top
+ // of desktop GL and GL_ARB_robustness extension is available.
+ gpu_info->can_lose_context =
+ (gfx::GetGLImplementation() == gfx::kGLImplementationEGLGLES2);
+ }
+
gpu_info->finalized = true;
return CollectGraphicsInfoGL(gpu_info);
}
« no previous file with comments | « content/browser/gpu/gpu_process_host.cc ('k') | ui/gfx/gl/gl_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698