Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0c8ad64d authored by Simon Wilson's avatar Simon Wilson Committed by Android (Google) Code Review
Browse files

Merge "fix [3127755] Launcher is missing anti-aliasing" into gingerbread

parents 12b82c8d f9954c7e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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");
        }

    }
+2 −0
Original line number Diff line number Diff line
@@ -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;
+5 −1
Original line number Diff line number Diff line
@@ -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]);
    }