1 // 2 // Copyright 2016 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 // TextureNULL.h: 7 // Defines the class interface for TextureNULL, implementing TextureImpl. 8 // 9 10 #ifndef LIBANGLE_RENDERER_NULL_TEXTURENULL_H_ 11 #define LIBANGLE_RENDERER_NULL_TEXTURENULL_H_ 12 13 #include "libANGLE/renderer/TextureImpl.h" 14 15 namespace rx 16 { 17 18 class TextureNULL : public TextureImpl 19 { 20 public: 21 TextureNULL(const gl::TextureState &state); 22 ~TextureNULL() override; 23 24 angle::Result setImage(const gl::Context *context, 25 const gl::ImageIndex &index, 26 GLenum internalFormat, 27 const gl::Extents &size, 28 GLenum format, 29 GLenum type, 30 const gl::PixelUnpackState &unpack, 31 gl::Buffer *unpackBuffer, 32 const uint8_t *pixels) override; 33 angle::Result setSubImage(const gl::Context *context, 34 const gl::ImageIndex &index, 35 const gl::Box &area, 36 GLenum format, 37 GLenum type, 38 const gl::PixelUnpackState &unpack, 39 gl::Buffer *unpackBuffer, 40 const uint8_t *pixels) override; 41 42 angle::Result setCompressedImage(const gl::Context *context, 43 const gl::ImageIndex &index, 44 GLenum internalFormat, 45 const gl::Extents &size, 46 const gl::PixelUnpackState &unpack, 47 size_t imageSize, 48 const uint8_t *pixels) override; 49 angle::Result setCompressedSubImage(const gl::Context *context, 50 const gl::ImageIndex &index, 51 const gl::Box &area, 52 GLenum format, 53 const gl::PixelUnpackState &unpack, 54 size_t imageSize, 55 const uint8_t *pixels) override; 56 57 angle::Result copyImage(const gl::Context *context, 58 const gl::ImageIndex &index, 59 const gl::Rectangle &sourceArea, 60 GLenum internalFormat, 61 gl::Framebuffer *source) override; 62 angle::Result copySubImage(const gl::Context *context, 63 const gl::ImageIndex &index, 64 const gl::Offset &destOffset, 65 const gl::Rectangle &sourceArea, 66 gl::Framebuffer *source) override; 67 68 angle::Result copyTexture(const gl::Context *context, 69 const gl::ImageIndex &index, 70 GLenum internalFormat, 71 GLenum type, 72 GLint sourceLevel, 73 bool unpackFlipY, 74 bool unpackPremultiplyAlpha, 75 bool unpackUnmultiplyAlpha, 76 const gl::Texture *source) override; 77 angle::Result copySubTexture(const gl::Context *context, 78 const gl::ImageIndex &index, 79 const gl::Offset &destOffset, 80 GLint sourceLevel, 81 const gl::Box &sourceBox, 82 bool unpackFlipY, 83 bool unpackPremultiplyAlpha, 84 bool unpackUnmultiplyAlpha, 85 const gl::Texture *source) override; 86 87 angle::Result copyRenderbufferSubData(const gl::Context *context, 88 const gl::Renderbuffer *srcBuffer, 89 GLint srcLevel, 90 GLint srcX, 91 GLint srcY, 92 GLint srcZ, 93 GLint dstLevel, 94 GLint dstX, 95 GLint dstY, 96 GLint dstZ, 97 GLsizei srcWidth, 98 GLsizei srcHeight, 99 GLsizei srcDepth) override; 100 101 angle::Result copyTextureSubData(const gl::Context *context, 102 const gl::Texture *srcTexture, 103 GLint srcLevel, 104 GLint srcX, 105 GLint srcY, 106 GLint srcZ, 107 GLint dstLevel, 108 GLint dstX, 109 GLint dstY, 110 GLint dstZ, 111 GLsizei srcWidth, 112 GLsizei srcHeight, 113 GLsizei srcDepth) override; 114 115 angle::Result copyCompressedTexture(const gl::Context *context, 116 const gl::Texture *source) override; 117 118 angle::Result setStorage(const gl::Context *context, 119 gl::TextureType type, 120 size_t levels, 121 GLenum internalFormat, 122 const gl::Extents &size) override; 123 124 angle::Result setStorageExternalMemory(const gl::Context *context, 125 gl::TextureType type, 126 size_t levels, 127 GLenum internalFormat, 128 const gl::Extents &size, 129 gl::MemoryObject *memoryObject, 130 GLuint64 offset, 131 GLbitfield createFlags, 132 GLbitfield usageFlags, 133 const void *imageCreateInfoPNext) override; 134 135 angle::Result setEGLImageTarget(const gl::Context *context, 136 gl::TextureType type, 137 egl::Image *image) override; 138 139 angle::Result setImageExternal(const gl::Context *context, 140 gl::TextureType type, 141 egl::Stream *stream, 142 const egl::Stream::GLTextureDescription &desc) override; 143 144 angle::Result generateMipmap(const gl::Context *context) override; 145 146 angle::Result setBaseLevel(const gl::Context *context, GLuint baseLevel) override; 147 148 angle::Result bindTexImage(const gl::Context *context, egl::Surface *surface) override; 149 angle::Result releaseTexImage(const gl::Context *context) override; 150 151 angle::Result syncState(const gl::Context *context, 152 const gl::Texture::DirtyBits &dirtyBits, 153 gl::Command source) override; 154 155 angle::Result setStorageMultisample(const gl::Context *context, 156 gl::TextureType type, 157 GLsizei samples, 158 GLint internalformat, 159 const gl::Extents &size, 160 bool fixedSampleLocations) override; 161 162 angle::Result initializeContents(const gl::Context *context, 163 GLenum binding, 164 const gl::ImageIndex &imageIndex) override; 165 }; 166 167 } // namespace rx 168 169 #endif // LIBANGLE_RENDERER_NULL_TEXTURENULL_H_ 170