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 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/native_library.h" | 12 #include "base/native_library.h" |
13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
14 #include "ui/gfx/gl/gl_export.h" | 14 #include "ui/gfx/gl/gl_export.h" |
15 #include "ui/gfx/gl/gl_switches.h" | 15 #include "ui/gfx/gl/gl_switches.h" |
16 | 16 |
17 namespace gfx { | 17 namespace gfx { |
18 | 18 |
19 class GLContext; | 19 class GLContext; |
20 | 20 |
21 // The GL implementation currently in use. | 21 // The GL implementation currently in use. |
22 enum GLImplementation { | 22 enum GLImplementation { |
23 kGLImplementationNone, | 23 kGLImplementationNone, |
24 kGLImplementationDesktopGL, | 24 kGLImplementationDesktopGL, |
25 kGLImplementationOSMesaGL, | 25 kGLImplementationOSMesaGL, |
| 26 kGLImplementationAppleGL, |
26 kGLImplementationEGLGLES2, | 27 kGLImplementationEGLGLES2, |
27 kGLImplementationMockGL | 28 kGLImplementationMockGL |
28 }; | 29 }; |
29 | 30 |
30 void GetAllowedGLImplementations(std::vector<GLImplementation>* impls); | 31 void GetAllowedGLImplementations(std::vector<GLImplementation>* impls); |
31 | 32 |
32 #if defined(OS_WIN) | 33 #if defined(OS_WIN) |
33 typedef void* (WINAPI *GLGetProcAddressProc)(const char* name); | 34 typedef void* (WINAPI *GLGetProcAddressProc)(const char* name); |
34 #else | 35 #else |
35 typedef void* (*GLGetProcAddressProc)(const char* name); | 36 typedef void* (*GLGetProcAddressProc)(const char* name); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 // EGL based implementations core entry points will not be queried through | 77 // EGL based implementations core entry points will not be queried through |
77 // GLGetProcAddressProc. | 78 // GLGetProcAddressProc. |
78 void* GetGLCoreProcAddress(const char* name); | 79 void* GetGLCoreProcAddress(const char* name); |
79 | 80 |
80 // Find an entry point in the current GL implementation. | 81 // Find an entry point in the current GL implementation. |
81 void* GetGLProcAddress(const char* name); | 82 void* GetGLProcAddress(const char* name); |
82 | 83 |
83 } // namespace gfx | 84 } // namespace gfx |
84 | 85 |
85 #endif // UI_GFX_GL_GL_IMPLEMENTATION_H_ | 86 #endif // UI_GFX_GL_GL_IMPLEMENTATION_H_ |
OLD | NEW |