Chromium Code Reviews| 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) | |
|
sky
2011/07/27 15:51:05
Condition includes should be after other includes.
sky
2011/07/27 22:22:22
In that case you should have the condition system
| |
| 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 | |
| 8 #include "ui/gfx/gl/gl_bindings.h" | 12 #include "ui/gfx/gl/gl_bindings.h" |
| 9 | 13 |
| 10 namespace gfx { | 14 namespace gfx { |
| 11 | 15 |
| 12 // Returns the last EGL error as a string. | 16 // Returns the last EGL error as a string. |
| 13 const char* GetLastEGLErrorString() { | 17 const char* GetLastEGLErrorString() { |
| 14 EGLint error = eglGetError(); | 18 EGLint error = eglGetError(); |
| 15 switch (error) { | 19 switch (error) { |
| 16 case EGL_SUCCESS: | 20 case EGL_SUCCESS: |
| 17 return "EGL_SUCCESS"; | 21 return "EGL_SUCCESS"; |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 38 case EGL_BAD_NATIVE_PIXMAP: | 42 case EGL_BAD_NATIVE_PIXMAP: |
| 39 return "EGL_BAD_NATIVE_PIXMAP"; | 43 return "EGL_BAD_NATIVE_PIXMAP"; |
| 40 case EGL_BAD_NATIVE_WINDOW: | 44 case EGL_BAD_NATIVE_WINDOW: |
| 41 return "EGL_BAD_NATIVE_WINDOW"; | 45 return "EGL_BAD_NATIVE_WINDOW"; |
| 42 default: | 46 default: |
| 43 return "UNKNOWN"; | 47 return "UNKNOWN"; |
| 44 } | 48 } |
| 45 } | 49 } |
| 46 | 50 |
| 47 } // namespace gfx | 51 } // namespace gfx |
| OLD | NEW |