summaryrefslogtreecommitdiff
path: root/libs/hwui/Texture.cpp
diff options
context:
space:
mode:
author Derek Sollenberger <djsollen@google.com> 2016-01-22 14:07:37 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2016-01-22 14:07:37 +0000
commita83c1e545e017a272eedf4d2c78ecd779aa84645 (patch)
tree5002258293f657c9fb0abbbe0c762568a872df33 /libs/hwui/Texture.cpp
parentfb71d2d0deddc1baa1c86d95d1fbf848a3ea3e72 (diff)
parent88d842fedf9a6c03dee1f2c91bc7a1f51c8438da (diff)
Merge "Add support for bitmaps with Grey_8 color type."
Diffstat (limited to 'libs/hwui/Texture.cpp')
-rw-r--r--libs/hwui/Texture.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/hwui/Texture.cpp b/libs/hwui/Texture.cpp
index c5000e4cadbc..92de89491127 100644
--- a/libs/hwui/Texture.cpp
+++ b/libs/hwui/Texture.cpp
@@ -180,6 +180,10 @@ static void colorTypeToGlFormatAndType(SkColorType colorType,
*outFormat = GL_RGBA;
*outType = GL_UNSIGNED_BYTE;
break;
+ case kGray_8_SkColorType:
+ *outFormat = GL_LUMINANCE;
+ *outType = GL_UNSIGNED_BYTE;
+ break;
default:
LOG_ALWAYS_FATAL("Unsupported bitmap colorType: %d", colorType);
break;