1 #ifndef _TEGLTESTCASE_HPP
2 #define _TEGLTESTCASE_HPP
3 /*-------------------------------------------------------------------------
4 * drawElements Quality Program EGL Module
5 * ---------------------------------------
7 * Copyright 2014 The Android Open Source Project
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
13 * http://www.apache.org/licenses/LICENSE-2.0
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.
23 * \brief EGL Test Case
24 *//*--------------------------------------------------------------------*/
26 #include "tcuDefs.hpp"
27 #include "tcuTestCase.hpp"
28 #include "tcuFunctionLibrary.hpp"
30 #include "egluNativeDisplay.hpp"
31 #include "egluGLFunctionLoader.hpp"
32 #include "egluConfigInfo.hpp"
34 #include "eglwDefs.hpp"
36 #include "gluRenderContext.hpp"
38 #include "deUniquePtr.hpp"
45 class NativeDisplayFactory;
46 class NativeWindowFactory;
47 class NativePixmapFactory;
63 EglTestContext (tcu::TestContext& testCtx, const eglu::NativeDisplayFactory& displayFactory);
64 ~EglTestContext (void);
66 tcu::TestContext& getTestContext (void) const { return m_testCtx; }
67 const eglu::NativeDisplayFactory& getNativeDisplayFactory (void) const { return m_nativeDisplayFactory; }
68 eglu::NativeDisplay& getNativeDisplay (void) const { return *m_nativeDisplay; }
69 const eglw::Library& getLibrary (void) const;
71 void initGLFunctions (glw::Functions* dst, glu::ApiType apiType) const;
72 void initGLFunctions (glw::Functions* dst, glu::ApiType apiType, int numExtensions, const char* const* extensions) const;
75 EglTestContext (const EglTestContext&);
76 EglTestContext& operator= (const EglTestContext&);
78 tcu::TestContext& m_testCtx;
79 const eglu::NativeDisplayFactory& m_nativeDisplayFactory;
80 de::UniquePtr<eglu::NativeDisplay> m_nativeDisplay;
81 mutable eglu::GLLibraryCache m_glLibraryCache;
84 class TestCaseGroup : public tcu::TestCaseGroup
87 TestCaseGroup (EglTestContext& eglTestCtx, const char* name, const char* description);
88 virtual ~TestCaseGroup (void);
91 EglTestContext& m_eglTestCtx;
94 class TestCase : public tcu::TestCase
97 TestCase (EglTestContext& eglTestCtx, const char* name, const char* description);
98 TestCase (EglTestContext& eglTestCtx, tcu::TestNodeType type, const char* name, const char* description);
99 virtual ~TestCase (void);
102 EglTestContext& m_eglTestCtx;
108 #endif // _TEGLTESTCASE_HPP