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 #include "ui/gfx/gl/egl_util.h" | 5 #include "ui/gfx/gl/egl_util.h" |
6 | 6 |
7 #include "third_party/angle/include/EGL/egl.h" | 7 #include "third_party/angle/include/EGL/egl.h" |
| 8 |
| 9 // This needs to be after the EGL includes |
8 #include "ui/gfx/gl/gl_bindings.h" | 10 #include "ui/gfx/gl/gl_bindings.h" |
9 | 11 |
10 namespace gfx { | 12 namespace gfx { |
11 | 13 |
12 // Returns the last EGL error as a string. | 14 // Returns the last EGL error as a string. |
13 const char* GetLastEGLErrorString() { | 15 const char* GetLastEGLErrorString() { |
14 EGLint error = eglGetError(); | 16 EGLint error = eglGetError(); |
15 switch (error) { | 17 switch (error) { |
16 case EGL_SUCCESS: | 18 case EGL_SUCCESS: |
17 return "EGL_SUCCESS"; | 19 return "EGL_SUCCESS"; |
(...skipping 20 matching lines...) Expand all Loading... |
38 case EGL_BAD_NATIVE_PIXMAP: | 40 case EGL_BAD_NATIVE_PIXMAP: |
39 return "EGL_BAD_NATIVE_PIXMAP"; | 41 return "EGL_BAD_NATIVE_PIXMAP"; |
40 case EGL_BAD_NATIVE_WINDOW: | 42 case EGL_BAD_NATIVE_WINDOW: |
41 return "EGL_BAD_NATIVE_WINDOW"; | 43 return "EGL_BAD_NATIVE_WINDOW"; |
42 default: | 44 default: |
43 return "UNKNOWN"; | 45 return "UNKNOWN"; |
44 } | 46 } |
45 } | 47 } |
46 | 48 |
47 } // namespace gfx | 49 } // namespace gfx |
OLD | NEW |