Loading libs/rs/rsContext.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -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"); } } Loading libs/rs/rsContext.h +2 −0 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -202,6 +203,7 @@ protected: int32_t mMaxVertexTextureUnits; bool OES_texture_npot; bool GL_IMG_texture_npot; } mGL; uint32_t mWidth; Loading libs/rs/rsSampler.cpp +5 −1 Original line number Diff line number Diff line Loading @@ -70,7 +70,11 @@ void Sampler::setupGL(const Context *rsc, bool npot) } if ((mMinFilter == RS_SAMPLER_LINEAR_MIP_LINEAR) && forceNonMip) { 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]); } Loading Loading
libs/rs/rsContext.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -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"); } } Loading
libs/rs/rsContext.h +2 −0 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -202,6 +203,7 @@ protected: int32_t mMaxVertexTextureUnits; bool OES_texture_npot; bool GL_IMG_texture_npot; } mGL; uint32_t mWidth; Loading
libs/rs/rsSampler.cpp +5 −1 Original line number Diff line number Diff line Loading @@ -70,7 +70,11 @@ void Sampler::setupGL(const Context *rsc, bool npot) } if ((mMinFilter == RS_SAMPLER_LINEAR_MIP_LINEAR) && forceNonMip) { 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]); } Loading