• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*-------------------------------------------------------------------------
2  * drawElements Quality Program Tester Core
3  * ----------------------------------------
4  *
5  * Copyright 2014 The Android Open Source Project
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 
21 #ifndef TCU_ANGLE_WIN32_NATIVE_DISPLAY_FACTORY_H_
22 #define TCU_ANGLE_WIN32_NATIVE_DISPLAY_FACTORY_H_
23 
24 #include "egluNativeDisplay.hpp"
25 #include "eglwDefs.hpp"
26 #include "tcuDefs.hpp"
27 
28 namespace tcu
29 {
30 
31 class EventState
32 {
33   public:
EventState()34     EventState() : mQuit(false) {}
quitSignaled()35     bool quitSignaled() const { return mQuit; };
signalQuitEvent()36     void signalQuitEvent() { mQuit = true; };
37 
38   private:
39     bool mQuit;
40 };
41 
42 class ANGLENativeDisplayFactory : public eglu::NativeDisplayFactory
43 {
44   public:
45     ANGLENativeDisplayFactory(const std::string &name,
46                               const std::string &description,
47                               std::vector<eglw::EGLAttrib> platformAttributes,
48                               EventState *eventState);
49     ~ANGLENativeDisplayFactory() override;
50 
51     eglu::NativeDisplay *createDisplay(const eglw::EGLAttrib *attribList) const override;
52 
53   private:
54     eglw::EGLNativeDisplayType mNativeDisplay;
55     std::vector<eglw::EGLAttrib> mPlatformAttributes;
56 };
57 
58 }  // namespace tcu
59 
60 #endif  // TCU_ANGLE_WIN32_NATIVE_DISPLAY_FACTORY_H_
61