1 // 2 // Copyright 2018 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 7 // RendererEGL.h: Renderer class for GL on Android/ChromeOS. Owns an EGL context object. 8 9 #ifndef LIBANGLE_RENDERER_GL_EGL_RENDEREREGL_H_ 10 #define LIBANGLE_RENDERER_GL_EGL_RENDEREREGL_H_ 11 12 #include "libANGLE/renderer/gl/RendererGL.h" 13 #include "libANGLE/renderer/gl/egl/egl_utils.h" 14 15 namespace rx 16 { 17 class DisplayEGL; 18 19 class RendererEGL : public RendererGL 20 { 21 public: 22 RendererEGL(std::unique_ptr<FunctionsGL> functionsGL, 23 const egl::AttributeMap &attribMap, 24 DisplayEGL *display, 25 EGLContext context, 26 const native_egl::AttributeVector attribs); 27 ~RendererEGL() override; 28 29 EGLContext getContext() const; 30 31 WorkerContext *createWorkerContext(std::string *infoLog) override; 32 33 private: 34 DisplayEGL *mDisplay; 35 EGLContext mContext; 36 const native_egl::AttributeVector mAttribs; 37 }; 38 } // namespace rx 39 40 #endif // LIBANGLE_RENDERER_GL_EGL_RENDEREREGL_H_ 41