summaryrefslogtreecommitdiff
path: root/libs/hwui/Texture.h
diff options
context:
space:
mode:
author Romain Guy <romainguy@google.com> 2013-05-24 16:19:19 -0700
committer Romain Guy <romainguy@google.com> 2013-05-24 16:19:19 -0700
commita404e16e4933857464046d763ed7629cd0c86cbf (patch)
treefec5bfa47138b29d22b25b9d87dc84ebfea7f1e6 /libs/hwui/Texture.h
parent64770d16b0907a8e1ee81ef6c8fa398a6bdbee79 (diff)
Make sure atlas antries can correctly filter/wrap textures
The virtual textures would each have their own values for wrapping and filtering which could lead to conflict and/or extraneous GL commands being issued. Change-Id: I64cb59a03e598f46bf645bd1d30fccfa63a07431
Diffstat (limited to 'libs/hwui/Texture.h')
-rw-r--r--libs/hwui/Texture.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/libs/hwui/Texture.h b/libs/hwui/Texture.h
index dd39cae14fab..f84cd67aeaa1 100644
--- a/libs/hwui/Texture.h
+++ b/libs/hwui/Texture.h
@@ -48,13 +48,15 @@ struct Texture {
uvMapper = NULL;
}
+ virtual ~Texture() { }
+
void setWrap(GLenum wrap, bool bindTexture = false, bool force = false,
GLenum renderTarget = GL_TEXTURE_2D) {
setWrapST(wrap, wrap, bindTexture, force, renderTarget);
}
- void setWrapST(GLenum wrapS, GLenum wrapT, bool bindTexture = false, bool force = false,
- GLenum renderTarget = GL_TEXTURE_2D) {
+ virtual void setWrapST(GLenum wrapS, GLenum wrapT, bool bindTexture = false,
+ bool force = false, GLenum renderTarget = GL_TEXTURE_2D) {
if (firstWrap || force || wrapS != this->wrapS || wrapT != this->wrapT) {
firstWrap = false;
@@ -76,8 +78,8 @@ struct Texture {
setFilterMinMag(filter, filter, bindTexture, force, renderTarget);
}
- void setFilterMinMag(GLenum min, GLenum mag, bool bindTexture = false, bool force = false,
- GLenum renderTarget = GL_TEXTURE_2D) {
+ virtual void setFilterMinMag(GLenum min, GLenum mag, bool bindTexture = false,
+ bool force = false, GLenum renderTarget = GL_TEXTURE_2D) {
if (firstFilter || force || min != minFilter || mag != magFilter) {
firstFilter = false;