diff options
author | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-04 22:32:59 +0000 |
---|---|---|
committer | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-04 22:32:59 +0000 |
commit | 7dac0741e8d8db31cf9ac9dcb5a13270a2b34beb (patch) | |
tree | d9a08e2d3367514a374b2d48d6eb18a34afacc31 /app | |
parent | ed96b47040fe4debcfb6ae7f15c79252519c08dd (diff) | |
download | chromium_src-7dac0741e8d8db31cf9ac9dcb5a13270a2b34beb.zip chromium_src-7dac0741e8d8db31cf9ac9dcb5a13270a2b34beb.tar.gz chromium_src-7dac0741e8d8db31cf9ac9dcb5a13270a2b34beb.tar.bz2 |
GPU process does not fall back to alternative GL implementation.
Unless the --use-gl command line switch is specified, only the default GL implementation will be used. On windows this is ANGLE. On other platforms it it OpenGL.
Falling back on OpenGL implementations that are generally not as reliable as the default was causing crashes.
TEST=try, check GL implementation does not fallback
BUG=none
Review URL: http://codereview.chromium.org/6246116
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73857 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app')
-rw-r--r-- | app/gfx/gl/gl_context_linux.cc | 7 | ||||
-rw-r--r-- | app/gfx/gl/gl_context_mac.cc | 7 | ||||
-rw-r--r-- | app/gfx/gl/gl_context_win.cc | 7 | ||||
-rw-r--r-- | app/gfx/gl/gl_implementation.cc | 12 | ||||
-rw-r--r-- | app/gfx/gl/gl_implementation.h | 7 |
5 files changed, 20 insertions, 20 deletions
diff --git a/app/gfx/gl/gl_context_linux.cc b/app/gfx/gl/gl_context_linux.cc index ec31ceb..577f4f8 100644 --- a/app/gfx/gl/gl_context_linux.cc +++ b/app/gfx/gl/gl_context_linux.cc @@ -191,10 +191,11 @@ bool GLContext::InitializeOneOff() { kGLImplementationOSMesaGL }; - if (!InitializeBestGLBindings( + if (!InitializeRequestedGLBindings( kAllowedGLImplementations, - kAllowedGLImplementations + arraysize(kAllowedGLImplementations))) { - LOG(ERROR) << "InitializeBestGLBindings failed."; + kAllowedGLImplementations + arraysize(kAllowedGLImplementations), + kGLImplementationDesktopGL)) { + LOG(ERROR) << "InitializeRequestedGLBindings failed."; return false; } diff --git a/app/gfx/gl/gl_context_mac.cc b/app/gfx/gl/gl_context_mac.cc index 841d1a6..6ae754d 100644 --- a/app/gfx/gl/gl_context_mac.cc +++ b/app/gfx/gl/gl_context_mac.cc @@ -61,10 +61,11 @@ bool GLContext::InitializeOneOff() { kGLImplementationOSMesaGL }; - if (!InitializeBestGLBindings( + if (!InitializeRequestedGLBindings( kAllowedGLImplementations, - kAllowedGLImplementations + arraysize(kAllowedGLImplementations))) { - LOG(ERROR) << "InitializeBestGLBindings failed."; + kAllowedGLImplementations + arraysize(kAllowedGLImplementations), + kGLImplementationDesktopGL)) { + LOG(ERROR) << "InitializeRequestedGLBindings failed."; return false; } diff --git a/app/gfx/gl/gl_context_win.cc b/app/gfx/gl/gl_context_win.cc index 3c724df..0da789f 100644 --- a/app/gfx/gl/gl_context_win.cc +++ b/app/gfx/gl/gl_context_win.cc @@ -177,10 +177,11 @@ bool GLContext::InitializeOneOff() { kGLImplementationOSMesaGL }; - if (!InitializeBestGLBindings( + if (!InitializeRequestedGLBindings( kAllowedGLImplementations, - kAllowedGLImplementations + arraysize(kAllowedGLImplementations))) { - LOG(ERROR) << "InitializeBestGLBinding failed."; + kAllowedGLImplementations + arraysize(kAllowedGLImplementations), + kGLImplementationEGLGLES2)) { + LOG(ERROR) << "InitializeRequestedGLBindings failed."; return false; } diff --git a/app/gfx/gl/gl_implementation.cc b/app/gfx/gl/gl_implementation.cc index 30ff0e3..a56b6bb 100644 --- a/app/gfx/gl/gl_implementation.cc +++ b/app/gfx/gl/gl_implementation.cc @@ -67,9 +67,10 @@ const char* GetGLImplementationName(GLImplementation implementation) { return "unknown"; } -bool InitializeBestGLBindings( +bool InitializeRequestedGLBindings( const GLImplementation* allowed_implementations_begin, - const GLImplementation* allowed_implementations_end) { + const GLImplementation* allowed_implementations_end, + GLImplementation default_implementation) { if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseGL)) { std::string requested_implementation_name = CommandLine::ForCurrentProcess()->GetSwitchValueASCII(switches::kUseGL); @@ -84,12 +85,7 @@ bool InitializeBestGLBindings( InitializeGLBindings(requested_implementation); } else { - for (const GLImplementation* p = allowed_implementations_begin; - p < allowed_implementations_end; - ++p) { - if (InitializeGLBindings(*p)) - break; - } + InitializeGLBindings(default_implementation); } if (GetGLImplementation() == kGLImplementationNone) { diff --git a/app/gfx/gl/gl_implementation.h b/app/gfx/gl/gl_implementation.h index b8f43f1..04d914c 100644 --- a/app/gfx/gl/gl_implementation.h +++ b/app/gfx/gl/gl_implementation.h @@ -54,10 +54,11 @@ const char* GetGLImplementationName(GLImplementation implementation); // Initialize the preferred GL binding from the given list. The preferred GL // bindings depend on command line switches passed by the user and which GL -// implementations are available and working on the system -bool InitializeBestGLBindings( +// implementation is the default on a given platform. +bool InitializeRequestedGLBindings( const GLImplementation* allowed_implementations_begin, - const GLImplementation* allowed_implementations_end); + const GLImplementation* allowed_implementations_end, + GLImplementation default_implementation); // Add a native library to those searched for GL entry points. void AddGLNativeLibrary(base::NativeLibrary library); |