am 0c8ad64d: Merge "fix [3127755] Launcher is missing anti-aliasing" into gingerbread
* commit '0c8ad64d64b23e2bdd62bc217e327c7e0583784b': fix [3127755] Launcher is missing anti-aliasing
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);
|
glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_VECTORS, &mGL.mMaxFragmentUniformVectors);
|
||||||
|
|
||||||
mGL.OES_texture_npot = NULL != strstr((const char *)mGL.mExtensions, "GL_OES_texture_npot");
|
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;
|
mutable const ObjectBase * mObjHead;
|
||||||
|
|
||||||
bool ext_OES_texture_npot() const {return mGL.OES_texture_npot;}
|
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:
|
protected:
|
||||||
Device *mDev;
|
Device *mDev;
|
||||||
@@ -202,6 +203,7 @@ protected:
|
|||||||
int32_t mMaxVertexTextureUnits;
|
int32_t mMaxVertexTextureUnits;
|
||||||
|
|
||||||
bool OES_texture_npot;
|
bool OES_texture_npot;
|
||||||
|
bool GL_IMG_texture_npot;
|
||||||
} mGL;
|
} mGL;
|
||||||
|
|
||||||
uint32_t mWidth;
|
uint32_t mWidth;
|
||||||
|
|||||||
@@ -70,7 +70,11 @@ void Sampler::setupGL(const Context *rsc, bool npot)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((mMinFilter == RS_SAMPLER_LINEAR_MIP_LINEAR) && forceNonMip) {
|
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 {
|
} else {
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, trans[mMinFilter]);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, trans[mMinFilter]);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user