From 623d22319374074cdf1f1339e7cda4a1f7527f64 Mon Sep 17 00:00:00 2001 From: John Reck Date: Fri, 12 Feb 2016 08:08:29 -0800 Subject: [PATCH] Fix bytesPerPixel for SurfaceTexture Bug: 27158985 Change-Id: I148a86d76314681eb778292dd0eb64503375f328 --- libs/hwui/Texture.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/hwui/Texture.cpp b/libs/hwui/Texture.cpp index 49a103c01108c..4f49a3518be02 100644 --- a/libs/hwui/Texture.cpp +++ b/libs/hwui/Texture.cpp @@ -28,6 +28,9 @@ namespace uirenderer { static int bytesPerPixel(GLint glFormat) { switch (glFormat) { + // The wrapped-texture case, usually means a SurfaceTexture + case 0: + return 0; case GL_ALPHA: return 1; case GL_RGB: