Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: ui/gfx/gl/egl_util.cc

Issue 10392068: ui: Move gl/ directory out of gfx/, up to ui/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix mac_rel Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/gfx/gl/egl_util.h ('k') | ui/gfx/gl/generate_bindings.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "ui/gfx/gl/egl_util.h"
6
7 #if defined(OS_ANDROID)
8 #include <EGL/egl.h>
9 #else
10 #include "third_party/angle/include/EGL/egl.h"
11 #endif
12
13 // This needs to be after the EGL includes
14 #include "ui/gfx/gl/gl_bindings.h"
15
16 namespace gfx {
17
18 // Returns the last EGL error as a string.
19 const char* GetLastEGLErrorString() {
20 EGLint error = eglGetError();
21 switch (error) {
22 case EGL_SUCCESS:
23 return "EGL_SUCCESS";
24 case EGL_BAD_ACCESS:
25 return "EGL_BAD_ACCESS";
26 case EGL_BAD_ALLOC:
27 return "EGL_BAD_ALLOC";
28 case EGL_BAD_ATTRIBUTE:
29 return "EGL_BAD_ATTRIBUTE";
30 case EGL_BAD_CONTEXT:
31 return "EGL_BAD_CONTEXT";
32 case EGL_BAD_CONFIG:
33 return "EGL_BAD_CONFIG";
34 case EGL_BAD_CURRENT_SURFACE:
35 return "EGL_BAD_CURRENT_SURFACE";
36 case EGL_BAD_DISPLAY:
37 return "EGL_BAD_DISPLAY";
38 case EGL_BAD_SURFACE:
39 return "EGL_BAD_SURFACE";
40 case EGL_BAD_MATCH:
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";
48 default:
49 return "UNKNOWN";
50 }
51 }
52
53 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/gl/egl_util.h ('k') | ui/gfx/gl/generate_bindings.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698