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 // ImageGL.h: Defines the rx::ImageGL class, the GL implementation of EGL images 8 9 #ifndef LIBANGLE_RENDERER_GL_IMAGEGL_H_ 10 #define LIBANGLE_RENDERER_GL_IMAGEGL_H_ 11 12 #include "common/PackedEnums.h" 13 #include "libANGLE/renderer/ImageImpl.h" 14 15 namespace rx 16 { 17 class TextureGL; 18 class RenderbufferGL; 19 20 class ImageGL : public ImageImpl 21 { 22 public: 23 ImageGL(const egl::ImageState &state); 24 ~ImageGL() override; 25 26 // TextureGL does not have access to all the parameters needed to implement 27 // glEGLImageTargetTexture2DOES or glEGLImageTargetRenderbufferStorageOES. This allows the Image 28 // to implement these functions because it holds the native EGLimage or emulated object. 29 virtual angle::Result setTexture2D(const gl::Context *context, 30 gl::TextureType type, 31 TextureGL *texture, 32 GLenum *outInternalFormat) = 0; 33 virtual angle::Result setRenderbufferStorage(const gl::Context *context, 34 RenderbufferGL *renderbuffer, 35 GLenum *outInternalFormat) = 0; 36 }; 37 38 } // namespace rx 39 40 #endif // LIBANGLE_RENDERER_GL_IMAGEGL_H_ 41