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 <EGL/egl.h> 25 #include <EGL/eglext.h> 26 #include "egluNativeDisplay.hpp" 27 #include "eglwDefs.hpp" 28 #include "tcuDefs.hpp" 29 30 namespace tcu 31 { 32 33 class EventState 34 { 35 public: EventState()36 EventState() : mQuit(false) {} quitSignaled()37 bool quitSignaled() const { return mQuit; }; signalQuitEvent()38 void signalQuitEvent() { mQuit = true; }; 39 40 private: 41 bool mQuit; 42 }; 43 44 class ANGLENativeDisplayFactory : public eglu::NativeDisplayFactory 45 { 46 public: 47 ANGLENativeDisplayFactory(const std::string &name, 48 const std::string &description, 49 std::vector<eglw::EGLAttrib> platformAttributes, 50 EventState *eventState, 51 const EGLenum platformType = EGL_PLATFORM_ANGLE_ANGLE); 52 ~ANGLENativeDisplayFactory() override; 53 54 eglu::NativeDisplay *createDisplay(const eglw::EGLAttrib *attribList) const override; 55 56 private: 57 eglw::EGLNativeDisplayType mNativeDisplay; 58 std::vector<eglw::EGLAttrib> mPlatformAttributes; 59 EGLenum mPlatformType; 60 }; 61 62 } // namespace tcu 63 64 #endif // TCU_ANGLE_WIN32_NATIVE_DISPLAY_FACTORY_H_ 65