OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_GFX_GL_GL_IMPLEMENTATION_H_ | 5 #ifndef UI_GFX_GL_GL_IMPLEMENTATION_H_ |
6 #define UI_GFX_GL_GL_IMPLEMENTATION_H_ | 6 #define UI_GFX_GL_GL_IMPLEMENTATION_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/native_library.h" | 11 #include "base/native_library.h" |
12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
13 #include "ui/gfx/gl/gl_export.h" | 13 #include "ui/gfx/gl/gl_export.h" |
14 #include "ui/gfx/gl/gl_switches.h" | 14 #include "ui/gfx/gl/gl_switches.h" |
15 | 15 |
16 namespace gfx { | 16 namespace gfx { |
17 | 17 |
18 // The GL implementation currently in use. | 18 // The GL implementation currently in use. |
19 enum GLImplementation { | 19 enum GLImplementation { |
20 kGLImplementationNone, | 20 kGLImplementationNone, |
21 kGLImplementationDesktopGL, | 21 kGLImplementationDesktopGL, |
22 kGLImplementationOSMesaGL, | 22 kGLImplementationOSMesaGL, |
23 kGLImplementationEGLGLES2, | 23 kGLImplementationEGLGLES2, |
24 kGLImplementationMockGL | 24 kGLImplementationMockGL, |
25 kGLImplementationAny | |
alokp
2011/09/27 15:55:48
This does not seem right. "use-gl=any" is not an i
Zhenyao Mo
2011/09/27 18:01:56
Done.
| |
25 }; | 26 }; |
26 | 27 |
27 #if defined(OS_WIN) | 28 #if defined(OS_WIN) |
28 typedef void* (WINAPI *GLGetProcAddressProc)(const char* name); | 29 typedef void* (WINAPI *GLGetProcAddressProc)(const char* name); |
29 #else | 30 #else |
30 typedef void* (*GLGetProcAddressProc)(const char* name); | 31 typedef void* (*GLGetProcAddressProc)(const char* name); |
31 #endif | 32 #endif |
32 | 33 |
33 // Initialize a particular GL implementation. | 34 // Initialize a particular GL implementation. |
34 GL_EXPORT bool InitializeGLBindings(GLImplementation implementation); | 35 GL_EXPORT bool InitializeGLBindings(GLImplementation implementation); |
(...skipping 30 matching lines...) Expand all Loading... | |
65 | 66 |
66 // Set an additional function that will be called to find GL entry points. | 67 // Set an additional function that will be called to find GL entry points. |
67 void SetGLGetProcAddressProc(GLGetProcAddressProc proc); | 68 void SetGLGetProcAddressProc(GLGetProcAddressProc proc); |
68 | 69 |
69 // Find an entry point in the current GL implementation. | 70 // Find an entry point in the current GL implementation. |
70 void* GetGLProcAddress(const char* name); | 71 void* GetGLProcAddress(const char* name); |
71 | 72 |
72 } // namespace gfx | 73 } // namespace gfx |
73 | 74 |
74 #endif // UI_GFX_GL_GL_IMPLEMENTATION_H_ | 75 #endif // UI_GFX_GL_GL_IMPLEMENTATION_H_ |
OLD | NEW |