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
3 // found in the LICENSE file.
5 #include "ui/gl/egl_util.h"
7 #if defined(OS_ANDROID)
10 #include "third_party/khronos/EGL/egl.h"
13 // This needs to be after the EGL includes
14 #include "ui/gl/gl_bindings.h"
18 // Returns the last EGL error as a string.
19 const char* GetLastEGLErrorString() {
20 EGLint error
= eglGetError();
25 return "EGL_BAD_ACCESS";
27 return "EGL_BAD_ALLOC";
28 case EGL_BAD_ATTRIBUTE
:
29 return "EGL_BAD_ATTRIBUTE";
31 return "EGL_BAD_CONTEXT";
33 return "EGL_BAD_CONFIG";
34 case EGL_BAD_CURRENT_SURFACE
:
35 return "EGL_BAD_CURRENT_SURFACE";
37 return "EGL_BAD_DISPLAY";
39 return "EGL_BAD_SURFACE";
41 return "EGL_BAD_MATCH";
42 case EGL_BAD_PARAMETER
:
43 return "EGL_BAD_PARAMETER";
44 case EGL_BAD_NATIVE_PIXMAP
:
45 return "EGL_BAD_NATIVE_PIXMAP";
46 case EGL_BAD_NATIVE_WINDOW
:
47 return "EGL_BAD_NATIVE_WINDOW";