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

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

Merge "Fix bpp mismatch" into nyc-dev

parents d3107e88 1d4e6a09
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -165,6 +165,10 @@ Texture* GradientCache::addLinearGradient(GradientCacheEntry& gradient,
    generateTexture(colors, positions, info.width, 2, texture);

    mSize += size;
    LOG_ALWAYS_FATAL_IF((int)size != texture->objectSize(),
            "size != texture->objectSize(), size %" PRIu32 ", objectSize %" PRIu32
            " width = %" PRIu32 " bytesPerPixel() = %" PRIu32,
            size, texture->objectSize(), info.width, bytesPerPixel());
    mCache.put(gradient, texture);

    return texture;
+4 −1
Original line number Diff line number Diff line
@@ -33,8 +33,11 @@ static int bytesPerPixel(GLint glFormat) {
    case GL_RGB:
        return 3;
    case GL_RGBA:
    default:
        return 4;
    case GL_RGBA16F:
        return 16;
    default:
        LOG_ALWAYS_FATAL("UNKNOWN FORMAT %d", glFormat);
    }
}