• 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.cpp:
7 //    Implements the class methods for TextureNULL.
8 //
9 
10 #include "libANGLE/renderer/null/TextureNULL.h"
11 
12 #include "common/debug.h"
13 
14 namespace rx
15 {
16 
TextureNULL(const gl::TextureState & state)17 TextureNULL::TextureNULL(const gl::TextureState &state) : TextureImpl(state) {}
18 
~TextureNULL()19 TextureNULL::~TextureNULL() {}
20 
setImage(const gl::Context * context,const gl::ImageIndex & index,GLenum internalFormat,const gl::Extents & size,GLenum format,GLenum type,const gl::PixelUnpackState & unpack,gl::Buffer * unpackBuffer,const uint8_t * pixels)21 angle::Result TextureNULL::setImage(const gl::Context *context,
22                                     const gl::ImageIndex &index,
23                                     GLenum internalFormat,
24                                     const gl::Extents &size,
25                                     GLenum format,
26                                     GLenum type,
27                                     const gl::PixelUnpackState &unpack,
28                                     gl::Buffer *unpackBuffer,
29                                     const uint8_t *pixels)
30 {
31     // TODO(geofflang): Read all incoming pixel data (maybe hash it?) to make sure we don't read out
32     // of bounds due to validation bugs.
33     return angle::Result::Continue;
34 }
35 
setSubImage(const gl::Context * context,const gl::ImageIndex & index,const gl::Box & area,GLenum format,GLenum type,const gl::PixelUnpackState & unpack,gl::Buffer * unpackBuffer,const uint8_t * pixels)36 angle::Result TextureNULL::setSubImage(const gl::Context *context,
37                                        const gl::ImageIndex &index,
38                                        const gl::Box &area,
39                                        GLenum format,
40                                        GLenum type,
41                                        const gl::PixelUnpackState &unpack,
42                                        gl::Buffer *unpackBuffer,
43                                        const uint8_t *pixels)
44 {
45     return angle::Result::Continue;
46 }
47 
setCompressedImage(const gl::Context * context,const gl::ImageIndex & index,GLenum internalFormat,const gl::Extents & size,const gl::PixelUnpackState & unpack,size_t imageSize,const uint8_t * pixels)48 angle::Result TextureNULL::setCompressedImage(const gl::Context *context,
49                                               const gl::ImageIndex &index,
50                                               GLenum internalFormat,
51                                               const gl::Extents &size,
52                                               const gl::PixelUnpackState &unpack,
53                                               size_t imageSize,
54                                               const uint8_t *pixels)
55 {
56     return angle::Result::Continue;
57 }
58 
setCompressedSubImage(const gl::Context * context,const gl::ImageIndex & index,const gl::Box & area,GLenum format,const gl::PixelUnpackState & unpack,size_t imageSize,const uint8_t * pixels)59 angle::Result TextureNULL::setCompressedSubImage(const gl::Context *context,
60                                                  const gl::ImageIndex &index,
61                                                  const gl::Box &area,
62                                                  GLenum format,
63                                                  const gl::PixelUnpackState &unpack,
64                                                  size_t imageSize,
65                                                  const uint8_t *pixels)
66 {
67     return angle::Result::Continue;
68 }
69 
copyImage(const gl::Context * context,const gl::ImageIndex & index,const gl::Rectangle & sourceArea,GLenum internalFormat,gl::Framebuffer * source)70 angle::Result TextureNULL::copyImage(const gl::Context *context,
71                                      const gl::ImageIndex &index,
72                                      const gl::Rectangle &sourceArea,
73                                      GLenum internalFormat,
74                                      gl::Framebuffer *source)
75 {
76     return angle::Result::Continue;
77 }
78 
copySubImage(const gl::Context * context,const gl::ImageIndex & index,const gl::Offset & destOffset,const gl::Rectangle & sourceArea,gl::Framebuffer * source)79 angle::Result TextureNULL::copySubImage(const gl::Context *context,
80                                         const gl::ImageIndex &index,
81                                         const gl::Offset &destOffset,
82                                         const gl::Rectangle &sourceArea,
83                                         gl::Framebuffer *source)
84 {
85     return angle::Result::Continue;
86 }
87 
copyTexture(const gl::Context * context,const gl::ImageIndex & index,GLenum internalFormat,GLenum type,size_t sourceLevel,bool unpackFlipY,bool unpackPremultiplyAlpha,bool unpackUnmultiplyAlpha,const gl::Texture * source)88 angle::Result TextureNULL::copyTexture(const gl::Context *context,
89                                        const gl::ImageIndex &index,
90                                        GLenum internalFormat,
91                                        GLenum type,
92                                        size_t sourceLevel,
93                                        bool unpackFlipY,
94                                        bool unpackPremultiplyAlpha,
95                                        bool unpackUnmultiplyAlpha,
96                                        const gl::Texture *source)
97 {
98     return angle::Result::Continue;
99 }
100 
copySubTexture(const gl::Context * context,const gl::ImageIndex & index,const gl::Offset & destOffset,size_t sourceLevel,const gl::Box & sourceBox,bool unpackFlipY,bool unpackPremultiplyAlpha,bool unpackUnmultiplyAlpha,const gl::Texture * source)101 angle::Result TextureNULL::copySubTexture(const gl::Context *context,
102                                           const gl::ImageIndex &index,
103                                           const gl::Offset &destOffset,
104                                           size_t sourceLevel,
105                                           const gl::Box &sourceBox,
106                                           bool unpackFlipY,
107                                           bool unpackPremultiplyAlpha,
108                                           bool unpackUnmultiplyAlpha,
109                                           const gl::Texture *source)
110 {
111     return angle::Result::Continue;
112 }
113 
copyCompressedTexture(const gl::Context * context,const gl::Texture * source)114 angle::Result TextureNULL::copyCompressedTexture(const gl::Context *context,
115                                                  const gl::Texture *source)
116 {
117     return angle::Result::Continue;
118 }
119 
setStorage(const gl::Context * context,gl::TextureType type,size_t levels,GLenum internalFormat,const gl::Extents & size)120 angle::Result TextureNULL::setStorage(const gl::Context *context,
121                                       gl::TextureType type,
122                                       size_t levels,
123                                       GLenum internalFormat,
124                                       const gl::Extents &size)
125 {
126     return angle::Result::Continue;
127 }
128 
setStorageExternalMemory(const gl::Context * context,gl::TextureType type,size_t levels,GLenum internalFormat,const gl::Extents & size,gl::MemoryObject * memoryObject,GLuint64 offset)129 angle::Result TextureNULL::setStorageExternalMemory(const gl::Context *context,
130                                                     gl::TextureType type,
131                                                     size_t levels,
132                                                     GLenum internalFormat,
133                                                     const gl::Extents &size,
134                                                     gl::MemoryObject *memoryObject,
135                                                     GLuint64 offset)
136 {
137     return angle::Result::Continue;
138 }
139 
setEGLImageTarget(const gl::Context * context,gl::TextureType type,egl::Image * image)140 angle::Result TextureNULL::setEGLImageTarget(const gl::Context *context,
141                                              gl::TextureType type,
142                                              egl::Image *image)
143 {
144     return angle::Result::Continue;
145 }
146 
setImageExternal(const gl::Context * context,gl::TextureType type,egl::Stream * stream,const egl::Stream::GLTextureDescription & desc)147 angle::Result TextureNULL::setImageExternal(const gl::Context *context,
148                                             gl::TextureType type,
149                                             egl::Stream *stream,
150                                             const egl::Stream::GLTextureDescription &desc)
151 {
152     return angle::Result::Continue;
153 }
154 
generateMipmap(const gl::Context * context)155 angle::Result TextureNULL::generateMipmap(const gl::Context *context)
156 {
157     return angle::Result::Continue;
158 }
159 
setBaseLevel(const gl::Context * context,GLuint baseLevel)160 angle::Result TextureNULL::setBaseLevel(const gl::Context *context, GLuint baseLevel)
161 {
162     return angle::Result::Continue;
163 }
164 
bindTexImage(const gl::Context * context,egl::Surface * surface)165 angle::Result TextureNULL::bindTexImage(const gl::Context *context, egl::Surface *surface)
166 {
167     return angle::Result::Continue;
168 }
169 
releaseTexImage(const gl::Context * context)170 angle::Result TextureNULL::releaseTexImage(const gl::Context *context)
171 {
172     return angle::Result::Continue;
173 }
174 
syncState(const gl::Context * context,const gl::Texture::DirtyBits & dirtyBits)175 angle::Result TextureNULL::syncState(const gl::Context *context,
176                                      const gl::Texture::DirtyBits &dirtyBits)
177 {
178     return angle::Result::Continue;
179 }
180 
setStorageMultisample(const gl::Context * context,gl::TextureType type,GLsizei samples,GLint internalformat,const gl::Extents & size,bool fixedSampleLocations)181 angle::Result TextureNULL::setStorageMultisample(const gl::Context *context,
182                                                  gl::TextureType type,
183                                                  GLsizei samples,
184                                                  GLint internalformat,
185                                                  const gl::Extents &size,
186                                                  bool fixedSampleLocations)
187 {
188     return angle::Result::Continue;
189 }
190 
initializeContents(const gl::Context * context,const gl::ImageIndex & imageIndex)191 angle::Result TextureNULL::initializeContents(const gl::Context *context,
192                                               const gl::ImageIndex &imageIndex)
193 {
194     return angle::Result::Continue;
195 }
196 
197 }  // namespace rx
198