1 // 2 // Copyright 2022 The ANGLE Project Authors. All rights reserved. 3 // Use of this source code is governed by a BSD-style license that can be 4 // found in the LICENSE file. 5 // 6 // DeviceEGL.h: 7 // Defines the class interface for DeviceEGL, implementing DeviceImpl. 8 // 9 10 #ifndef LIBANGLE_RENDERER_GL_EGL__DEVICEEGL_H_ 11 #define LIBANGLE_RENDERER_GL_EGL__DEVICEEGL_H_ 12 13 #include "libANGLE/renderer/DeviceImpl.h" 14 15 namespace rx 16 { 17 18 class DisplayEGL; 19 20 class DeviceEGL : public DeviceImpl 21 { 22 public: 23 DeviceEGL(DisplayEGL *display); 24 ~DeviceEGL() override; 25 26 egl::Error initialize() override; 27 egl::Error getAttribute(const egl::Display *display, 28 EGLint attribute, 29 void **outValue) override; 30 EGLint getType() override; 31 void generateExtensions(egl::DeviceExtensions *outExtensions) const override; 32 const std::string getDeviceString(EGLint name) override; 33 34 private: 35 bool hasExtension(const char *extension) const; 36 37 DisplayEGL *mDisplay; 38 EGLDeviceEXT mDevice; 39 std::vector<std::string> mExtensions; 40 }; 41 42 } // namespace rx 43 44 #endif // LIBANGLE_RENDERER_GL_EGL__DEVICEEGL_H_ 45