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

Commit 623d2231 authored by John Reck's avatar John Reck
Browse files

Fix bytesPerPixel for SurfaceTexture

Bug: 27158985
Change-Id: I148a86d76314681eb778292dd0eb64503375f328
parent 19ff7804
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -28,6 +28,9 @@ namespace uirenderer {


static int bytesPerPixel(GLint glFormat) {
static int bytesPerPixel(GLint glFormat) {
    switch (glFormat) {
    switch (glFormat) {
    // The wrapped-texture case, usually means a SurfaceTexture
    case 0:
        return 0;
    case GL_ALPHA:
    case GL_ALPHA:
        return 1;
        return 1;
    case GL_RGB:
    case GL_RGB: