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

Unified Diff: ui/gl/gl_implementation.h

Issue 2629633003: Refactor GL bindings so there is no global GLApi or DriverGL. (Closed)
Patch Set: rebase Created 3 years, 11 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 | « ui/gl/gl_image_memory.cc ('k') | ui/gl/gl_implementation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_implementation.h
diff --git a/ui/gl/gl_implementation.h b/ui/gl/gl_implementation.h
index dc425076a098828531057b264302407f58bbee21..6fca58842bc9382b60de6e800caa9c9b4e61eea1 100644
--- a/ui/gl/gl_implementation.h
+++ b/ui/gl/gl_implementation.h
@@ -5,6 +5,7 @@
#ifndef UI_GL_GL_IMPLEMENTATION_H_
#define UI_GL_GL_IMPLEMENTATION_H_
+#include <memory>
#include <string>
#include <vector>
@@ -16,6 +17,9 @@
namespace gl {
+class GLApi;
+struct GLVersionInfo;
+
// The GL implementation currently in use.
enum GLImplementation {
kGLImplementationNone,
@@ -24,7 +28,8 @@ enum GLImplementation {
kGLImplementationOSMesaGL,
kGLImplementationAppleGL,
kGLImplementationEGLGLES2,
- kGLImplementationMockGL
+ kGLImplementationMockGL,
+ kGLImplementationStubGL,
};
struct GL_EXPORT GLWindowSystemBindingInfo {
@@ -109,11 +114,15 @@ GL_EXPORT GLFunctionPointerType GetGLProcAddress(const char* name);
// bindings themselves. This is a relatively expensive call, so
// callers should cache the result.
GL_EXPORT std::string GetGLExtensionsFromCurrentContext();
+GL_EXPORT std::string GetGLExtensionsFromCurrentContext(GLApi* api);
// Helper for the GL bindings implementation to understand whether
// glGetString(GL_EXTENSIONS) or glGetStringi(GL_EXTENSIONS, i) will
// be used in the function above.
GL_EXPORT bool WillUseGLGetStringForExtensions();
+GL_EXPORT bool WillUseGLGetStringForExtensions(GLApi* api);
+
+GL_EXPORT std::unique_ptr<GLVersionInfo> GetVersionInfoFromContext(GLApi* api);
// Helpers to load a library and log error on failure.
GL_EXPORT base::NativeLibrary LoadLibraryAndPrintError(
« no previous file with comments | « ui/gl/gl_image_memory.cc ('k') | ui/gl/gl_implementation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698