• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*-------------------------------------------------------------------------
2  * drawElements Quality Program Tester Core
3  * ----------------------------------------
4  *
5  * Copyright (c) 2016 The Khronos Group Inc.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  *//*!
20  * \file
21  * \brief Linux EGL Platform.
22  *//*--------------------------------------------------------------------*/
23 
24 #include "tcuLnxEglPlatform.hpp"
25 
26 #if defined (DEQP_SUPPORT_X11)
27 #	include "tcuLnxX11EglDisplayFactory.hpp"
28 #endif // DEQP_SUPPORT_X11
29 
30 #if defined (DEQP_SUPPORT_WAYLAND)
31 #	include "tcuLnxWaylandEglDisplayFactory.hpp"
32 #endif // DEQP_SUPPORT_WAYLAND
33 
34 #include "egluGLContextFactory.hpp"
35 
36 namespace tcu
37 {
38 namespace lnx
39 {
40 namespace egl
41 {
42 
Platform(EventState & eventState)43 Platform::Platform (EventState& eventState)
44 {
45 #if defined (DEQP_SUPPORT_X11)
46 	m_nativeDisplayFactoryRegistry.registerFactory(x11::egl::createDisplayFactory(eventState));
47 #endif // DEQP_SUPPORT_X11
48 
49 #if defined (DEQP_SUPPORT_WAYLAND)
50 	m_nativeDisplayFactoryRegistry.registerFactory(wayland::egl::createDisplayFactory(eventState));
51 #endif // DEQP_SUPPORT_WAYLAND
52 
53 }
54 
createContextFactory(void)55 de::MovePtr<glu::ContextFactory> Platform::createContextFactory (void)
56 {
57 	return de::MovePtr<glu::ContextFactory>(new eglu::GLContextFactory(m_nativeDisplayFactoryRegistry));
58 }
59 
60 } // egl
61 } // linux
62 } // tcu
63 
64