diff options
| author | 2016-02-12 08:08:29 -0800 | |
|---|---|---|
| committer | 2016-02-12 08:08:29 -0800 | |
| commit | 623d22319374074cdf1f1339e7cda4a1f7527f64 (patch) | |
| tree | ae15a8064cbb653a908ca980a196a5c5b43dae61 /libs/hwui/Texture.cpp | |
| parent | 19ff7804b394e80a6adf731e756c3d7c361cba42 (diff) | |
Fix bytesPerPixel for SurfaceTexture
Bug: 27158985
Change-Id: I148a86d76314681eb778292dd0eb64503375f328
Diffstat (limited to 'libs/hwui/Texture.cpp')
| -rw-r--r-- | libs/hwui/Texture.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/hwui/Texture.cpp b/libs/hwui/Texture.cpp index 49a103c01108..4f49a3518be0 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: |