diff options
| author | 2010-08-19 14:46:45 -0700 | |
|---|---|---|
| committer | 2010-08-19 14:46:45 -0700 | |
| commit | 494413faa24192526689d2d95c5420ba021477a7 (patch) | |
| tree | 9c2065f446761f293f2cea3020b8e6c6890b950a /libs | |
| parent | e0cac8402a82f383d4c34eb9481641cdc4b6d14f (diff) | |
| parent | e9e7fd0813f1485d20c6cd0014d59aff53c35d84 (diff) | |
Merge "Update OpenGLRenderer test to test opaque ARGB8888 bitmaps."
Diffstat (limited to 'libs')
| -rw-r--r-- | libs/hwui/TextureCache.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/hwui/TextureCache.cpp b/libs/hwui/TextureCache.cpp index 3f9698db6032..2e8a8be3cf86 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; |