diff options
author | 2010-10-27 18:57:51 -0700 | |
---|---|---|
committer | 2010-11-02 16:17:23 -0700 | |
commit | 5b3b35296e8b2c8d3f07d32bb645d5414db41a1d (patch) | |
tree | bad2ebdbfeb8a3a0be1591d5a357a8280df7d1d2 /libs/hwui/TextureCache.cpp | |
parent | 2444ddb3d9b59ec45ba50858fcbff639e59b93b1 (diff) |
Optimize FBO drawing with regions.
This optimization is currently disabled until Launcher is
modified to take advantage of it. The optimization can be
enabled by turning on RENDER_LAYERS_AS_REGIONS in the
OpenGLRenderer.h file.
Change-Id: I2fdf59d0f4dc690a3d7f712173ab8db3848b27b1
Diffstat (limited to 'libs/hwui/TextureCache.cpp')
-rw-r--r-- | libs/hwui/TextureCache.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libs/hwui/TextureCache.cpp b/libs/hwui/TextureCache.cpp index d860953bc247..0c7948f70f98 100644 --- a/libs/hwui/TextureCache.cpp +++ b/libs/hwui/TextureCache.cpp @@ -200,9 +200,13 @@ void TextureCache::generateTexture(SkBitmap* bitmap, Texture* texture, bool rege texture->blend = !bitmap->isOpaque(); break; case SkBitmap::kIndex8_Config: - uploadPalettedTexture(resize, bitmap, texture->width, texture->height); + uploadLoFiTexture(resize, bitmap, texture->width, texture->height); texture->blend = false; break; + case SkBitmap::kARGB_4444_Config: + uploadLoFiTexture(resize, bitmap, texture->width, texture->height); + texture->blend = true; + break; default: LOGW("Unsupported bitmap config: %d", bitmap->getConfig()); break; @@ -215,7 +219,7 @@ void TextureCache::generateTexture(SkBitmap* bitmap, Texture* texture, bool rege glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); } -void TextureCache::uploadPalettedTexture(bool resize, SkBitmap* bitmap, +void TextureCache::uploadLoFiTexture(bool resize, SkBitmap* bitmap, uint32_t width, uint32_t height) { SkBitmap rgbaBitmap; rgbaBitmap.setConfig(SkBitmap::kARGB_8888_Config, width, height); |