• 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 
7 // TextureImpl.cpp: Defines the abstract rx::TextureImpl classes.
8 
9 #include "libANGLE/renderer/TextureImpl.h"
10 
11 namespace rx
12 {
TextureImpl(const gl::TextureState & state)13 TextureImpl::TextureImpl(const gl::TextureState &state) : mState(state) {}
14 
~TextureImpl()15 TextureImpl::~TextureImpl() {}
16 
onDestroy(const gl::Context * context)17 void TextureImpl::onDestroy(const gl::Context *context) {}
18 
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)19 angle::Result TextureImpl::copyTexture(const gl::Context *context,
20                                        const gl::ImageIndex &index,
21                                        GLenum internalFormat,
22                                        GLenum type,
23                                        size_t sourceLevel,
24                                        bool unpackFlipY,
25                                        bool unpackPremultiplyAlpha,
26                                        bool unpackUnmultiplyAlpha,
27                                        const gl::Texture *source)
28 {
29     UNREACHABLE();
30     return angle::Result::Stop;
31 }
32 
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)33 angle::Result TextureImpl::copySubTexture(const gl::Context *context,
34                                           const gl::ImageIndex &index,
35                                           const gl::Offset &destOffset,
36                                           size_t sourceLevel,
37                                           const gl::Box &sourceBox,
38                                           bool unpackFlipY,
39                                           bool unpackPremultiplyAlpha,
40                                           bool unpackUnmultiplyAlpha,
41                                           const gl::Texture *source)
42 {
43     UNREACHABLE();
44     return angle::Result::Stop;
45 }
46 
copyCompressedTexture(const gl::Context * context,const gl::Texture * source)47 angle::Result TextureImpl::copyCompressedTexture(const gl::Context *context,
48                                                  const gl::Texture *source)
49 {
50     UNREACHABLE();
51     return angle::Result::Stop;
52 }
53 
copy3DTexture(const gl::Context * context,gl::TextureTarget target,GLenum internalFormat,GLenum type,size_t sourceLevel,size_t destLevel,bool unpackFlipY,bool unpackPremultiplyAlpha,bool unpackUnmultiplyAlpha,const gl::Texture * source)54 angle::Result TextureImpl::copy3DTexture(const gl::Context *context,
55                                          gl::TextureTarget target,
56                                          GLenum internalFormat,
57                                          GLenum type,
58                                          size_t sourceLevel,
59                                          size_t destLevel,
60                                          bool unpackFlipY,
61                                          bool unpackPremultiplyAlpha,
62                                          bool unpackUnmultiplyAlpha,
63                                          const gl::Texture *source)
64 {
65     UNREACHABLE();
66     return angle::Result::Stop;
67 }
68 
copy3DSubTexture(const gl::Context * context,const gl::TextureTarget target,const gl::Offset & destOffset,size_t sourceLevel,size_t destLevel,const gl::Box & srcBox,bool unpackFlipY,bool unpackPremultiplyAlpha,bool unpackUnmultiplyAlpha,const gl::Texture * source)69 angle::Result TextureImpl::copy3DSubTexture(const gl::Context *context,
70                                             const gl::TextureTarget target,
71                                             const gl::Offset &destOffset,
72                                             size_t sourceLevel,
73                                             size_t destLevel,
74                                             const gl::Box &srcBox,
75                                             bool unpackFlipY,
76                                             bool unpackPremultiplyAlpha,
77                                             bool unpackUnmultiplyAlpha,
78                                             const gl::Texture *source)
79 {
80     UNREACHABLE();
81     return angle::Result::Stop;
82 }
83 
setImageExternal(const gl::Context * context,const gl::ImageIndex & index,GLenum internalFormat,const gl::Extents & size,GLenum format,GLenum type)84 angle::Result TextureImpl::setImageExternal(const gl::Context *context,
85                                             const gl::ImageIndex &index,
86                                             GLenum internalFormat,
87                                             const gl::Extents &size,
88                                             GLenum format,
89                                             GLenum type)
90 {
91     UNREACHABLE();
92     return angle::Result::Stop;
93 }
94 
getMemorySize() const95 GLint TextureImpl::getMemorySize() const
96 {
97     return 0;
98 }
99 
getLevelMemorySize(gl::TextureTarget target,GLint level)100 GLint TextureImpl::getLevelMemorySize(gl::TextureTarget target, GLint level)
101 {
102     return 0;
103 }
104 
getNativeID() const105 GLint TextureImpl::getNativeID() const
106 {
107     UNREACHABLE();
108     return 0;
109 }
110 
getColorReadFormat(const gl::Context * context)111 GLenum TextureImpl::getColorReadFormat(const gl::Context *context)
112 {
113     UNREACHABLE();
114     return GL_NONE;
115 }
116 
getColorReadType(const gl::Context * context)117 GLenum TextureImpl::getColorReadType(const gl::Context *context)
118 {
119     UNREACHABLE();
120     return GL_NONE;
121 }
122 
getTexImage(const gl::Context * context,const gl::PixelPackState & packState,gl::Buffer * packBuffer,gl::TextureTarget target,GLint level,GLenum format,GLenum type,void * pixels)123 angle::Result TextureImpl::getTexImage(const gl::Context *context,
124                                        const gl::PixelPackState &packState,
125                                        gl::Buffer *packBuffer,
126                                        gl::TextureTarget target,
127                                        GLint level,
128                                        GLenum format,
129                                        GLenum type,
130                                        void *pixels)
131 {
132     UNREACHABLE();
133     return angle::Result::Stop;
134 }
135 }  // namespace rx
136