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 size_t 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 size_t 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 copyCompressedTexture(const gl::Context *context, 88 const gl::Texture *source) override; 89 90 angle::Result setStorage(const gl::Context *context, 91 gl::TextureType type, 92 size_t levels, 93 GLenum internalFormat, 94 const gl::Extents &size) override; 95 96 angle::Result setStorageExternalMemory(const gl::Context *context, 97 gl::TextureType type, 98 size_t levels, 99 GLenum internalFormat, 100 const gl::Extents &size, 101 gl::MemoryObject *memoryObject, 102 GLuint64 offset) override; 103 104 angle::Result setEGLImageTarget(const gl::Context *context, 105 gl::TextureType type, 106 egl::Image *image) override; 107 108 angle::Result setImageExternal(const gl::Context *context, 109 gl::TextureType type, 110 egl::Stream *stream, 111 const egl::Stream::GLTextureDescription &desc) override; 112 113 angle::Result generateMipmap(const gl::Context *context) override; 114 115 angle::Result setBaseLevel(const gl::Context *context, GLuint baseLevel) override; 116 117 angle::Result bindTexImage(const gl::Context *context, egl::Surface *surface) override; 118 angle::Result releaseTexImage(const gl::Context *context) override; 119 120 angle::Result syncState(const gl::Context *context, 121 const gl::Texture::DirtyBits &dirtyBits) override; 122 123 angle::Result setStorageMultisample(const gl::Context *context, 124 gl::TextureType type, 125 GLsizei samples, 126 GLint internalformat, 127 const gl::Extents &size, 128 bool fixedSampleLocations) override; 129 130 angle::Result initializeContents(const gl::Context *context, 131 const gl::ImageIndex &imageIndex) override; 132 }; 133 134 } // namespace rx 135 136 #endif // LIBANGLE_RENDERER_NULL_TEXTURENULL_H_ 137