Home | History | Annotate | Download | only in ui
      1 /*
      2  * Copyright (C) 2009 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 
     18 #ifndef ANDROID_UI_EGLUTILS_H
     19 #define ANDROID_UI_EGLUTILS_H
     20 
     21 #include <utils/Errors.h>
     22 #include <ui/PixelFormat.h>
     23 #include <EGL/egl.h>
     24 
     25 
     26 // ----------------------------------------------------------------------------
     27 namespace android {
     28 // ----------------------------------------------------------------------------
     29 
     30 class EGLUtils
     31 {
     32 public:
     33 
     34     static const char *strerror(EGLint err);
     35 
     36     static status_t selectConfigForPixelFormat(
     37             EGLDisplay dpy,
     38             EGLint const* attrs,
     39             PixelFormat format,
     40             EGLConfig* outConfig);
     41 
     42     static status_t selectConfigForNativeWindow(
     43             EGLDisplay dpy,
     44             EGLint const* attrs,
     45             EGLNativeWindowType window,
     46             EGLConfig* outConfig);
     47 };
     48 
     49 // ----------------------------------------------------------------------------
     50 }; // namespace android
     51 // ----------------------------------------------------------------------------
     52 
     53 #endif /* ANDROID_UI_EGLUTILS_H */
     54