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

Commit 92429d92 authored by Romain Guy's avatar Romain Guy
Browse files

Fix premultiplied alpha.

Change-Id: I08da422c5350503e1f4f27b9890f15a813d0c6c7
parent c7f3ce84
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -558,7 +558,7 @@ void OpenGLRenderer::drawTextureRect(float left, float top, float right, float b
    getAlphaAndMode(paint, &alpha, &mode);

    drawTextureMesh(left, top, right, bottom, texture->id, alpha / 255.0f, mode,
            texture->blend, texture->blend, &mDrawTextureVertices[0].position[0],
            texture->blend, isPremultiplied, &mDrawTextureVertices[0].position[0],
            &mDrawTextureVertices[0].texture[0], NULL);
}

+2 −2
Original line number Diff line number Diff line
@@ -179,7 +179,7 @@ private:
     * @param isPremultiplied Indicates whether the texture has premultiplied alpha
     */
    void drawTextureRect(float left, float top, float right, float bottom, GLuint texture,
            float alpha, SkXfermode::Mode mode, bool blend, bool isPremultiplied = false);
            float alpha, SkXfermode::Mode mode, bool blend, bool isPremultiplied = true);

    /**
     * Draws a textured rectangle with the specified texture. The specified coordinates
@@ -194,7 +194,7 @@ private:
     * @param isPremultiplied Indicates whether the texture has premultiplied alpha
     */
    void drawTextureRect(float left, float top, float right, float bottom, const Texture* texture,
            const SkPaint* paint, bool isPremultiplied = false);
            const SkPaint* paint, bool isPremultiplied = true);

    /**
     * Draws a textured mesh with the specified texture. If the indices are omitted, the