diff options
author | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-27 19:42:56 +0000 |
---|---|---|
committer | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-27 19:42:56 +0000 |
commit | aefbf90a3d90cde03bd2f244a477084f276b6540 (patch) | |
tree | 2c0b2513ab5c5040d49ff5e226671d58c892a8d0 /app/gfx | |
parent | eadc9679d5b47b498877d074efdc0ca913bd09b8 (diff) | |
download | chromium_src-aefbf90a3d90cde03bd2f244a477084f276b6540.zip chromium_src-aefbf90a3d90cde03bd2f244a477084f276b6540.tar.gz chromium_src-aefbf90a3d90cde03bd2f244a477084f276b6540.tar.bz2 |
ui_tests run with --use-gl=osmesa so they use the OSMesa software renderer for GL.
This to ensure that ui_tests run consistently regardless of the GPU capabilities, or absense, of the box they run on.
TEST=try
BUG=none
Review URL: http://codereview.chromium.org/4138003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64122 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app/gfx')
-rw-r--r-- | app/gfx/gl/gl_implementation.cc | 14 | ||||
-rw-r--r-- | app/gfx/gl/gl_implementation.h | 6 |
2 files changed, 16 insertions, 4 deletions
diff --git a/app/gfx/gl/gl_implementation.cc b/app/gfx/gl/gl_implementation.cc index 21a4455..2a83cd2 100644 --- a/app/gfx/gl/gl_implementation.cc +++ b/app/gfx/gl/gl_implementation.cc @@ -13,6 +13,12 @@ #include "base/logging.h" namespace gfx { + +const char kGLImplementationDesktopName[] = "desktop"; +const char kGLImplementationOSMesaName[] = "osmesa"; +const char kGLImplementationEGLName[] = "egl"; +const char kGLImplementationMockName[] = "mock"; + namespace { typedef std::vector<base::NativeLibrary> LibraryArray; @@ -38,10 +44,10 @@ GLImplementation GetNamedGLImplementation(const std::string& name) { const char* name; GLImplementation implemention; } name_pairs[] = { - { "desktop", kGLImplementationDesktopGL }, - { "osmesa", kGLImplementationOSMesaGL }, - { "egl", kGLImplementationEGLGLES2 }, - { "mock", kGLImplementationMockGL } + { kGLImplementationDesktopName, kGLImplementationDesktopGL }, + { kGLImplementationOSMesaName, kGLImplementationOSMesaGL }, + { kGLImplementationEGLName, kGLImplementationEGLGLES2 }, + { kGLImplementationMockName, kGLImplementationMockGL } }; for (size_t i = 0; i < ARRAYSIZE_UNSAFE(name_pairs); ++i) { diff --git a/app/gfx/gl/gl_implementation.h b/app/gfx/gl/gl_implementation.h index 1b016b4..91dd617 100644 --- a/app/gfx/gl/gl_implementation.h +++ b/app/gfx/gl/gl_implementation.h @@ -22,6 +22,12 @@ enum GLImplementation { kGLImplementationMockGL }; +// The GL implementation names that can be passed to --use-gl. +extern const char kGLImplementationDesktopName[]; +extern const char kGLImplementationOSMesaName[]; +extern const char kGLImplementationEGLName[]; +extern const char kGLImplementationMockName[]; + #if defined(OS_WIN) typedef void* (WINAPI *GLGetProcAddressProc)(const char* name); #else |