• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef _EGLUUTIL_HPP
2 #define _EGLUUTIL_HPP
3 /*-------------------------------------------------------------------------
4  * drawElements Quality Program Tester Core
5  * ----------------------------------------
6  *
7  * Copyright 2014 The Android Open Source Project
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  *
21  *//*!
22  * \file
23  * \brief EGL utilities
24  *//*--------------------------------------------------------------------*/
25 
26 #include "tcuDefs.hpp"
27 #include "egluHeaderWrapper.hpp"
28 #include "egluNativeWindow.hpp"
29 
30 #include <vector>
31 #include <map>
32 #include <string>
33 
34 namespace tcu
35 {
36 class CommandLine;
37 }
38 
39 namespace eglu
40 {
41 
42 class NativeDisplay;
43 class NativePixmap;
44 
45 typedef std::map<EGLint, EGLint> AttribMap;
46 
47 std::vector<std::string>	getPlatformExtensions		(void);
48 std::vector<std::string>	getClientExtensions			(EGLDisplay display);
49 std::vector<EGLConfig>		getConfigs					(EGLDisplay display);
50 std::vector<EGLConfig>		chooseConfig				(EGLDisplay display, const AttribMap& attribs);
51 EGLConfig					chooseSingleConfig			(EGLDisplay display, const AttribMap& attribs);
52 EGLint						getConfigAttribInt			(EGLDisplay display, EGLConfig config, EGLint attrib);
53 EGLint						querySurfaceInt				(EGLDisplay display, EGLSurface surface, EGLint attrib);
54 tcu::IVec2					getSurfaceSize				(EGLDisplay display, EGLSurface surface);
55 tcu::IVec2					getSurfaceResolution		(EGLDisplay display, EGLSurface surface);
56 EGLDisplay					getDisplay					(NativeDisplay& nativeDisplay);
57 EGLSurface					createWindowSurface			(NativeDisplay& nativeDisplay, NativeWindow& window, EGLDisplay display, EGLConfig config, const EGLAttrib* attribList);
58 EGLSurface					createPixmapSurface			(NativeDisplay& nativeDisplay, NativePixmap& pixmap, EGLDisplay display, EGLConfig config, const EGLAttrib* attribList);
59 
60 WindowParams::Visibility	parseWindowVisibility		(const tcu::CommandLine& commandLine);
61 
62 std::vector<EGLint>			toLegacyAttribList			(const EGLAttrib* attribs);
63 
64 } // eglu
65 
66 #endif // _EGLUUTIL_HPP
67