summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorSimon Wilson <simonwilson@google.com>2010-12-20 14:11:46 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2010-12-20 14:11:46 -0800
commit490db31b851af9195f8f5bd4c5b21f59be56b207 (patch)
tree386a21bedd5f274bce4a208c5f06b1a2e649aaa0 /libs
parent0655b31d758ce8fe054c98c6d288e424f2d273e2 (diff)
parent0c8ad64d64b23e2bdd62bc217e327c7e0583784b (diff)
downloadframeworks_base-490db31b851af9195f8f5bd4c5b21f59be56b207.zip
frameworks_base-490db31b851af9195f8f5bd4c5b21f59be56b207.tar.gz
frameworks_base-490db31b851af9195f8f5bd4c5b21f59be56b207.tar.bz2
am 0c8ad64d: Merge "fix [3127755] Launcher is missing anti-aliasing" into gingerbread
* commit '0c8ad64d64b23e2bdd62bc217e327c7e0583784b': fix [3127755] Launcher is missing anti-aliasing
Diffstat (limited to 'libs')
-rw-r--r--libs/rs/rsContext.cpp1
-rw-r--r--libs/rs/rsContext.h2
-rw-r--r--libs/rs/rsSampler.cpp6
3 files changed, 8 insertions, 1 deletions
diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp
index 92c6619..90a2c79 100644
--- a/libs/rs/rsContext.cpp
+++ b/libs/rs/rsContext.cpp
@@ -572,6 +572,7 @@ void Context::setSurface(uint32_t w, uint32_t h, ANativeWindow *sur)
glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_VECTORS, &mGL.mMaxFragmentUniformVectors);
mGL.OES_texture_npot = NULL != strstr((const char *)mGL.mExtensions, "GL_OES_texture_npot");
+ mGL.GL_IMG_texture_npot = NULL != strstr((const char *)mGL.mExtensions, "GL_IMG_texture_npot");
}
}
diff --git a/libs/rs/rsContext.h b/libs/rs/rsContext.h
index 709730e..e24fd09 100644
--- a/libs/rs/rsContext.h
+++ b/libs/rs/rsContext.h
@@ -166,6 +166,7 @@ public:
mutable const ObjectBase * mObjHead;
bool ext_OES_texture_npot() const {return mGL.OES_texture_npot;}
+ bool ext_GL_IMG_texture_npot() const {return mGL.GL_IMG_texture_npot;}
protected:
Device *mDev;
@@ -202,6 +203,7 @@ protected:
int32_t mMaxVertexTextureUnits;
bool OES_texture_npot;
+ bool GL_IMG_texture_npot;
} mGL;
uint32_t mWidth;
diff --git a/libs/rs/rsSampler.cpp b/libs/rs/rsSampler.cpp
index 71f508f..5693c8a 100644
--- a/libs/rs/rsSampler.cpp
+++ b/libs/rs/rsSampler.cpp
@@ -70,7 +70,11 @@ void Sampler::setupGL(const Context *rsc, bool npot)
}
if ((mMinFilter == RS_SAMPLER_LINEAR_MIP_LINEAR) && forceNonMip) {
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ if (rsc->ext_GL_IMG_texture_npot()) {
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST);
+ } else {
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ }
} else {
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, trans[mMinFilter]);
}