summaryrefslogtreecommitdiffstats
path: root/ui/gfx/gl/gl_implementation.h
diff options
context:
space:
mode:
authoralokp@chromium.org <alokp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-08 22:29:38 +0000
committeralokp@chromium.org <alokp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-08 22:29:38 +0000
commit0f5e88813352010d2deab433c8061a09018d917c (patch)
tree344ae69b7d335c1c7d370505acd794cbdce28dc1 /ui/gfx/gl/gl_implementation.h
parentf2e80774a2d4c58d00fc61394bccc28e5fdc9f67 (diff)
downloadchromium_src-0f5e88813352010d2deab433c8061a09018d917c.zip
chromium_src-0f5e88813352010d2deab433c8061a09018d917c.tar.gz
chromium_src-0f5e88813352010d2deab433c8061a09018d917c.tar.bz2
Fix --use-gl=any command-line option. The current implementation only checks for the availability of certain shared libraries to determine of a GL implementation is feasible. You really have to actually create a context and check pixel formats to determine the feasibilty. Thsi patch refactors GLSurface::InitializeOneOff() to do further checking.
BUG=102672 Review URL: http://codereview.chromium.org/8451008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109111 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/gl/gl_implementation.h')
-rw-r--r--ui/gfx/gl/gl_implementation.h21
1 files changed, 9 insertions, 12 deletions
diff --git a/ui/gfx/gl/gl_implementation.h b/ui/gfx/gl/gl_implementation.h
index f675914..cfbb33a 100644
--- a/ui/gfx/gl/gl_implementation.h
+++ b/ui/gfx/gl/gl_implementation.h
@@ -7,6 +7,7 @@
#pragma once
#include <string>
+#include <vector>
#include "base/native_library.h"
#include "build/build_config.h"
@@ -26,6 +27,8 @@ enum GLImplementation {
kGLImplementationMockGL
};
+void GetAllowedGLImplementations(std::vector<GLImplementation>* impls);
+
#if defined(OS_WIN)
typedef void* (WINAPI *GLGetProcAddressProc)(const char* name);
#else
@@ -42,6 +45,8 @@ GL_EXPORT bool InitializeGLExtensionBindings(GLImplementation implementation,
// Initialize Debug logging wrappers for GL bindings.
void InitializeDebugGLBindings();
+void ClearGLBindings();
+
// Set the current GL implementation.
void SetGLImplementation(GLImplementation implementation);
@@ -53,25 +58,17 @@ GL_EXPORT GLImplementation GetGLImplementation();
GL_EXPORT bool HasDesktopGLFeatures();
// Get the GL implementation with a given name.
-GLImplementation GetNamedGLImplementation(const std::wstring& name);
+GLImplementation GetNamedGLImplementation(const std::string& name);
// Get the name of a GL implementation.
const char* GetGLImplementationName(GLImplementation implementation);
-// Get whether the current GL implementation is swiftshader.
-bool UsingSwiftShader();
-
-// 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
-// implementation is the default on a given platform.
-bool InitializeRequestedGLBindings(
- const GLImplementation* allowed_implementations_begin,
- const GLImplementation* allowed_implementations_end,
- GLImplementation default_implementation);
-
// Add a native library to those searched for GL entry points.
void AddGLNativeLibrary(base::NativeLibrary library);
+// Unloads all native libraries.
+void UnloadGLNativeLibraries();
+
// Set an additional function that will be called to find GL entry points.
void SetGLGetProcAddressProc(GLGetProcAddressProc proc);