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

Commit 07a4eb35 authored by Mathias Agopian's avatar Mathias Agopian Committed by Android Git Automerger
Browse files

am 83512d4d: DO NOT MERGE fix [2557396] Adreno200: glDrawTexi() doesn\'t work with height <= 16

Merge commit '83512d4dfc06137bc2d9db0cb62644c54f41a771' into froyo-plus-aosp

* commit '83512d4dfc06137bc2d9db0cb62644c54f41a771':
  DO NOT MERGE fix [2557396] Adreno200: glDrawTexi() doesn't work with height <= 16
parents 2bb2b502 11777e9a
Loading
Loading
Loading
Loading
+39 −54
Original line number Diff line number Diff line
@@ -437,9 +437,7 @@ void LayerBase::drawWithOpenGL(const Region& clip, const Texture& texture) const

    Region::const_iterator it = clip.begin();
    Region::const_iterator const end = clip.end();
    if (UNLIKELY(transformed()
            || !(mFlags & DisplayHardware::DRAW_TEXTURE_EXTENSION) )) 
    {

    //StopWatch watch("GL transformed");
    const GLfixed texCoords[4][2] = {
            { 0,        0 },
@@ -482,19 +480,6 @@ void LayerBase::drawWithOpenGL(const Region& clip, const Texture& texture) const
        glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
    }
    glDisableClientState(GL_TEXTURE_COORD_ARRAY);
    } else {
        GLint crop[4] = { 0, height, width, -height };
        glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, crop);
        int x = tx();
        int y = ty();
        y = fbHeight - (y + height);
        while (it != end) {
            const Rect& r = *it++;
            const GLint sy = fbHeight - (r.top + r.height());
            glScissor(r.left, sy, r.width(), r.height());
            glDrawTexiOES(x, y, 0, width, height);
        }
    }
}

void LayerBase::validateTexture(GLint textureName) const