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

Commit 71de1b65 authored by John Reck's avatar John Reck
Browse files

Fix wrong constant for R8 GL upload

GL_RED + GL_UNSIGNED_BYTE is the pairing for R8 for
glTex(Sub)Image2D, not GL_R8

Test: adb shell setprop debug.hwui.renderer skiagl && atest android.graphics.cts.GainmapTest
Fixes: 319734219
Change-Id: I73874e22f8958e4aaa52963546674ec9946f8013
parent a35c8f83
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -379,7 +379,7 @@ static FormatInfo determineFormat(const SkBitmap& skBitmap, bool usingGL) {
        case kAlpha_8_SkColorType:
            formatInfo.isSupported = HardwareBitmapUploader::hasAlpha8Support();
            formatInfo.bufferFormat = AHARDWAREBUFFER_FORMAT_R8_UNORM;
            formatInfo.format = GL_R8;
            formatInfo.format = GL_RED;
            formatInfo.type = GL_UNSIGNED_BYTE;
            formatInfo.vkFormat = VK_FORMAT_R8_UNORM;
            break;