OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/gl/egl_util.h" |
6 | 6 |
7 #if defined(OS_ANDROID) | 7 #if defined(OS_ANDROID) |
8 #include <EGL/egl.h> | 8 #include <EGL/egl.h> |
9 #else | 9 #else |
10 #include "third_party/angle/include/EGL/egl.h" | 10 #include "third_party/angle/include/EGL/egl.h" |
11 #endif | 11 #endif |
12 | 12 |
13 // This needs to be after the EGL includes | 13 // This needs to be after the EGL includes |
14 #include "ui/gfx/gl/gl_bindings.h" | 14 #include "ui/gl/gl_bindings.h" |
15 | 15 |
16 namespace gfx { | 16 namespace gfx { |
17 | 17 |
18 // Returns the last EGL error as a string. | 18 // Returns the last EGL error as a string. |
19 const char* GetLastEGLErrorString() { | 19 const char* GetLastEGLErrorString() { |
20 EGLint error = eglGetError(); | 20 EGLint error = eglGetError(); |
21 switch (error) { | 21 switch (error) { |
22 case EGL_SUCCESS: | 22 case EGL_SUCCESS: |
23 return "EGL_SUCCESS"; | 23 return "EGL_SUCCESS"; |
24 case EGL_BAD_ACCESS: | 24 case EGL_BAD_ACCESS: |
(...skipping 19 matching lines...) Expand all Loading... |
44 case EGL_BAD_NATIVE_PIXMAP: | 44 case EGL_BAD_NATIVE_PIXMAP: |
45 return "EGL_BAD_NATIVE_PIXMAP"; | 45 return "EGL_BAD_NATIVE_PIXMAP"; |
46 case EGL_BAD_NATIVE_WINDOW: | 46 case EGL_BAD_NATIVE_WINDOW: |
47 return "EGL_BAD_NATIVE_WINDOW"; | 47 return "EGL_BAD_NATIVE_WINDOW"; |
48 default: | 48 default: |
49 return "UNKNOWN"; | 49 return "UNKNOWN"; |
50 } | 50 } |
51 } | 51 } |
52 | 52 |
53 } // namespace gfx | 53 } // namespace gfx |
OLD | NEW |