summaryrefslogtreecommitdiffstats
path: root/libs/hwui
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2010-08-19 14:45:42 -0700
committerRomain Guy <romainguy@google.com>2010-08-19 14:45:42 -0700
commite9e7fd0813f1485d20c6cd0014d59aff53c35d84 (patch)
tree27439301826c76d553486539d128c84c648d004f /libs/hwui
parent207b3ab604bcbe47fa55f26f358cde60cf8a784d (diff)
downloadframeworks_base-e9e7fd0813f1485d20c6cd0014d59aff53c35d84.zip
frameworks_base-e9e7fd0813f1485d20c6cd0014d59aff53c35d84.tar.gz
frameworks_base-e9e7fd0813f1485d20c6cd0014d59aff53c35d84.tar.bz2
Update OpenGLRenderer test to test opaque ARGB8888 bitmaps.
Change-Id: I7159825f4b1d6f5a1cd09ec091994801b52b6bda
Diffstat (limited to 'libs/hwui')
-rw-r--r--libs/hwui/TextureCache.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/hwui/TextureCache.cpp b/libs/hwui/TextureCache.cpp
index 3f9698d..2e8a8be 100644
--- a/libs/hwui/TextureCache.cpp
+++ b/libs/hwui/TextureCache.cpp
@@ -149,9 +149,11 @@ void TextureCache::generateTexture(SkBitmap* bitmap, Texture* texture, bool rege
GL_RGB, GL_UNSIGNED_SHORT_5_6_5, bitmap->getPixels());
break;
case SkBitmap::kARGB_8888_Config:
- texture->blend = !bitmap->isOpaque();
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, bitmap->rowBytesAsPixels(), texture->height, 0,
GL_RGBA, GL_UNSIGNED_BYTE, bitmap->getPixels());
+ // Do this after calling getPixels() to make sure Skia's deferred
+ // decoding happened
+ texture->blend = !bitmap->isOpaque();
break;
default:
break;