• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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) override;
133 
134     angle::Result setEGLImageTarget(const gl::Context *context,
135                                     gl::TextureType type,
136                                     egl::Image *image) override;
137 
138     angle::Result setImageExternal(const gl::Context *context,
139                                    gl::TextureType type,
140                                    egl::Stream *stream,
141                                    const egl::Stream::GLTextureDescription &desc) override;
142 
143     angle::Result generateMipmap(const gl::Context *context) override;
144 
145     angle::Result setBaseLevel(const gl::Context *context, GLuint baseLevel) override;
146 
147     angle::Result bindTexImage(const gl::Context *context, egl::Surface *surface) override;
148     angle::Result releaseTexImage(const gl::Context *context) override;
149 
150     angle::Result syncState(const gl::Context *context,
151                             const gl::Texture::DirtyBits &dirtyBits,
152                             gl::Command source) override;
153 
154     angle::Result setStorageMultisample(const gl::Context *context,
155                                         gl::TextureType type,
156                                         GLsizei samples,
157                                         GLint internalformat,
158                                         const gl::Extents &size,
159                                         bool fixedSampleLocations) override;
160 
161     angle::Result initializeContents(const gl::Context *context,
162                                      const gl::ImageIndex &imageIndex) override;
163 };
164 
165 }  // namespace rx
166 
167 #endif  // LIBANGLE_RENDERER_NULL_TEXTURENULL_H_
168