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 bool isExternalContext); 28 ~RendererEGL() override; 29 30 EGLContext getContext() const; 31 32 WorkerContext *createWorkerContext(std::string *infoLog) override; 33 34 private: 35 DisplayEGL *mDisplay; 36 EGLContext mContext; 37 const native_egl::AttributeVector mAttribs; 38 const bool mIsExternalContext; 39 }; 40 } // namespace rx 41 42 #endif // LIBANGLE_RENDERER_GL_EGL_RENDEREREGL_H_ 43