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