Refactor texture storage management in the Texture2D.
TRAC #23976
Signed-off-by: Geoff Lang
Signed-off-by: Shannon Woods
diff --git a/src/libGLESv2/Texture.h b/src/libGLESv2/Texture.h
index cd4682e..24a630f 100644
--- a/src/libGLESv2/Texture.h
+++ b/src/libGLESv2/Texture.h
@@ -127,7 +127,7 @@
GLint creationLevels(GLsizei size) const;
int mipLevels() const;
- virtual void createTexture() = 0;
+ virtual void initializeStorage(bool renderTarget) = 0;
virtual void updateStorage() = 0;
virtual bool ensureRenderTarget() = 0;
@@ -196,7 +196,10 @@
private:
DISALLOW_COPY_AND_ASSIGN(Texture2D);
- virtual void createTexture();
+ virtual void initializeStorage(bool renderTarget);
+ rx::TextureStorageInterface2D *createCompleteStorage(bool renderTarget) const;
+ void setCompleteTexStorage(rx::TextureStorageInterface2D *newCompleteTexStorage);
+
virtual void updateStorage();
virtual bool ensureRenderTarget();
virtual rx::TextureStorageInterface *getStorage(bool renderTarget);
@@ -263,7 +266,7 @@
private:
DISALLOW_COPY_AND_ASSIGN(TextureCubeMap);
- virtual void createTexture();
+ virtual void initializeStorage(bool renderTarget);
virtual void updateStorage();
virtual bool ensureRenderTarget();
virtual rx::TextureStorageInterface *getStorage(bool renderTarget);
@@ -322,7 +325,7 @@
private:
DISALLOW_COPY_AND_ASSIGN(Texture3D);
- virtual void createTexture();
+ virtual void initializeStorage(bool renderTarget);
virtual void updateStorage();
virtual bool ensureRenderTarget();
@@ -379,7 +382,7 @@
private:
DISALLOW_COPY_AND_ASSIGN(Texture2DArray);
- virtual void createTexture();
+ virtual void initializeStorage(bool renderTarget);
virtual void updateStorage();
virtual bool ensureRenderTarget();