Merge "fix [3127755] Launcher is missing anti-aliasing" into gingerbread
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user