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

Commit 73d63b4a authored by John Reck's avatar John Reck Committed by Android (Google) Code Review
Browse files

Merge "Normalize GL_UNPACK_ALIGNMENT"

parents 47ea5c10 2de77717
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -139,9 +139,7 @@ void BakedOpRenderer::endFrame(const Rect& repaintRect) {
    mCaches.pathCache.trim();
    mCaches.tessellationCache.trim();

#if DEBUG_OPENGL
    GLUtils::dumpGLErrors();
#endif
    GL_CHECKPOINT();

#if DEBUG_MEMORY_USAGE
    mCaches.dumpMemoryUsage();
+0 −2
Original line number Diff line number Diff line
@@ -54,7 +54,6 @@ void Dither::bindDitherTexture() {
                15 * dither,  7 * dither, 13 * dither,  5 * dither
            };

            glPixelStorei(GL_UNPACK_ALIGNMENT, sizeof(GLfloat));
            glTexImage2D(GL_TEXTURE_2D, 0, GL_R16F, DITHER_KERNEL_SIZE, DITHER_KERNEL_SIZE, 0,
                    GL_RED, GL_FLOAT, &pattern);
        } else {
@@ -65,7 +64,6 @@ void Dither::bindDitherTexture() {
                15,  7, 13,  5
            };

            glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
            glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, DITHER_KERNEL_SIZE, DITHER_KERNEL_SIZE, 0,
                    GL_ALPHA, GL_UNSIGNED_BYTE, &pattern);
        }
+0 −1
Original line number Diff line number Diff line
@@ -458,7 +458,6 @@ void FontRenderer::checkTextureUpdate() {
    GLuint lastTextureId = 0;

    bool resetPixelStore = false;
    glPixelStorei(GL_UNPACK_ALIGNMENT, 1);

    // Iterate over all the cache textures and see which ones need to be updated
    checkTextureUpdateForCache(caches, mACacheTextures, resetPixelStore, lastTextureId);
+0 −2
Original line number Diff line number Diff line
@@ -273,8 +273,6 @@ void GradientCache::generateTexture(uint32_t* colors, float* positions,

    memcpy(pixels + rowBytes, pixels, rowBytes);

    glPixelStorei(GL_UNPACK_ALIGNMENT, 4);

    if (mUseFloatTexture) {
        // We have to use GL_RGBA16F because GL_RGBA32F does not support filtering
        texture->upload(GL_RGBA16F, width, height, GL_RGBA, GL_FLOAT, pixels);
+0 −1
Original line number Diff line number Diff line
@@ -207,7 +207,6 @@ void Layer::allocateTexture() {
#endif
    if (texture.mId) {
        texture.updateSize(getWidth(), getHeight(), GL_RGBA);
        glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
        glTexImage2D(renderTarget, 0, GL_RGBA, getWidth(), getHeight(), 0,
                GL_RGBA, GL_UNSIGNED_BYTE, nullptr);
    }
Loading