summaryrefslogtreecommitdiff
path: root/libs/hwui/Texture.h
diff options
context:
space:
mode:
author sergeyv <sergeyv@google.com> 2016-10-25 15:21:50 -0700
committer sergeyv <sergeyv@google.com> 2016-10-26 14:01:09 -0700
commit2a38c42e921451abebb4ee5f5ecd738f1b6b04ed (patch)
tree2074f10be351fa19cfd4fdb80a4e24ed649782ca /libs/hwui/Texture.h
parent98fa4f9e7b33a3004ce9142c9acd4300391b9a0e (diff)
Add target to texture
Test: refactoring cl. bug:32413624 Change-Id: I94b1c31cd4e0712dfcfd7777a0012424c1bf0dca
Diffstat (limited to 'libs/hwui/Texture.h')
-rw-r--r--libs/hwui/Texture.h25
1 files changed, 15 insertions, 10 deletions
diff --git a/libs/hwui/Texture.h b/libs/hwui/Texture.h
index 57cfc2b0a955..d73789a28ead 100644
--- a/libs/hwui/Texture.h
+++ b/libs/hwui/Texture.h
@@ -41,21 +41,19 @@ public:
virtual ~Texture() { }
- inline void setWrap(GLenum wrap, bool bindTexture = false, bool force = false,
- GLenum renderTarget = GL_TEXTURE_2D) {
- setWrapST(wrap, wrap, bindTexture, force, renderTarget);
+ inline void setWrap(GLenum wrap, bool bindTexture = false, bool force = false) {
+ setWrapST(wrap, wrap, bindTexture, force);
}
virtual void setWrapST(GLenum wrapS, GLenum wrapT, bool bindTexture = false,
- bool force = false, GLenum renderTarget = GL_TEXTURE_2D);
+ bool force = false);
- inline void setFilter(GLenum filter, bool bindTexture = false, bool force = false,
- GLenum renderTarget = GL_TEXTURE_2D) {
- setFilterMinMag(filter, filter, bindTexture, force, renderTarget);
+ inline void setFilter(GLenum filter, bool bindTexture = false, bool force = false) {
+ setFilterMinMag(filter, filter, bindTexture, force);
}
virtual void setFilterMinMag(GLenum min, GLenum mag, bool bindTexture = false,
- bool force = false, GLenum renderTarget = GL_TEXTURE_2D);
+ bool force = false);
/**
* Convenience method to call glDeleteTextures() on this texture's id.
@@ -91,7 +89,8 @@ public:
/**
* Wraps an existing texture.
*/
- void wrap(GLuint id, uint32_t width, uint32_t height, GLint internalFormat, GLint format);
+ void wrap(GLuint id, uint32_t width, uint32_t height, GLint internalFormat,
+ GLint format, GLenum target);
GLuint id() const {
return mId;
@@ -113,6 +112,10 @@ public:
return mInternalFormat;
}
+ GLenum target() const {
+ return mTarget;
+ }
+
/**
* Generation of the backing bitmap,
*/
@@ -152,7 +155,8 @@ private:
friend class Layer;
// Returns true if the size changed, false if it was the same
- bool updateSize(uint32_t width, uint32_t height, GLint internalFormat, GLint format);
+ bool updateSize(uint32_t width, uint32_t height, GLint internalFormat,
+ GLint format, GLenum target);
void resetCachedParams();
GLuint mId = 0;
@@ -160,6 +164,7 @@ private:
uint32_t mHeight = 0;
GLint mFormat = 0;
GLint mInternalFormat = 0;
+ GLenum mTarget = GL_NONE;
/* See GLES spec section 3.8.14
* "In the initial state, the value assigned to TEXTURE_MIN_FILTER is