diff options
| author | Romain Guy <romainguy@google.com> | 2010-07-22 18:50:12 -0700 |
|---|---|---|
| committer | Romain Guy <romainguy@google.com> | 2010-07-22 18:52:24 -0700 |
| commit | bd0e6aa0ff0bd8b376772c3e23513a6021bdda87 (patch) | |
| tree | c32048451001806f0be1361f970f9d1686cc1532 /libs/hwui/TextureCache.cpp | |
| parent | 950d6a984a49eac8e688a66a79a55c83e92eb869 (diff) | |
| download | frameworks_base-bd0e6aa0ff0bd8b376772c3e23513a6021bdda87.zip frameworks_base-bd0e6aa0ff0bd8b376772c3e23513a6021bdda87.tar.gz frameworks_base-bd0e6aa0ff0bd8b376772c3e23513a6021bdda87.tar.bz2 | |
Add a way to query GL extensions.
Change-Id: Ic27dbf72289dacf641b640a749fbd40c12cd474f
Diffstat (limited to 'libs/hwui/TextureCache.cpp')
| -rw-r--r-- | libs/hwui/TextureCache.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/hwui/TextureCache.cpp b/libs/hwui/TextureCache.cpp index ff9e2af..4975edb 100644 --- a/libs/hwui/TextureCache.cpp +++ b/libs/hwui/TextureCache.cpp @@ -128,6 +128,11 @@ void TextureCache::generateTexture(SkBitmap* bitmap, Texture* texture, bool rege glPixelStorei(GL_UNPACK_ALIGNMENT, bitmap->bytesPerPixel()); switch (bitmap->getConfig()) { + case SkBitmap::kA8_Config: + texture->blend = true; + glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, bitmap->rowBytesAsPixels(), texture->height, 0, + GL_ALPHA, GL_UNSIGNED_BYTE, bitmap->getPixels()); + break; case SkBitmap::kRGB_565_Config: texture->blend = false; glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, bitmap->rowBytesAsPixels(), texture->height, 0, |
