blob: a5bff812399b1fd8a6a92c00e85a9938b446f5c9 [file] [log] [blame]
Mathias Agopian265d9c02009-08-06 16:05:39 -07001/*
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// ----------------------------------------------------------------------------
27namespace android {
28// ----------------------------------------------------------------------------
29
30class EGLUtils
31{
32public:
33
Mathias Agopian509dae52009-08-07 16:37:21 -070034 static const char *strerror(EGLint err);
35
Mathias Agopian265d9c02009-08-06 16:05:39 -070036 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 */