summaryrefslogtreecommitdiffstats
path: root/libs/hwui/TextureCache.cpp
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2013-06-04 18:00:09 -0700
committerRomain Guy <romainguy@google.com>2013-06-04 18:58:36 -0700
commit8aa195d7081b889f3a7b1f426cbd8556377aae5e (patch)
tree6cd0ab4181c25d3113c4e39b49e8f8a0c7d12b8b /libs/hwui/TextureCache.cpp
parent84f3c5689cffbfc1e45a0101d5bb636323769f54 (diff)
downloadframeworks_base-8aa195d7081b889f3a7b1f426cbd8556377aae5e.zip
frameworks_base-8aa195d7081b889f3a7b1f426cbd8556377aae5e.tar.gz
frameworks_base-8aa195d7081b889f3a7b1f426cbd8556377aae5e.tar.bz2
Introduce Caches::bindTexture() to reduce glBindTexture calls
Change-Id: Ic345422567c020c0a9035ff51dcf2ae2a1fc59f4
Diffstat (limited to 'libs/hwui/TextureCache.cpp')
-rw-r--r--libs/hwui/TextureCache.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/hwui/TextureCache.cpp b/libs/hwui/TextureCache.cpp
index 2378eb5..7f5b80f 100644
--- a/libs/hwui/TextureCache.cpp
+++ b/libs/hwui/TextureCache.cpp
@@ -139,7 +139,7 @@ Texture* TextureCache::get(SkBitmap* bitmap) {
}
}
- texture = new Texture;
+ texture = new Texture();
texture->bitmapSize = size;
generateTexture(bitmap, texture, false);
@@ -162,7 +162,7 @@ Texture* TextureCache::get(SkBitmap* bitmap) {
}
Texture* TextureCache::getTransient(SkBitmap* bitmap) {
- Texture* texture = new Texture;
+ Texture* texture = new Texture();
texture->bitmapSize = bitmap->rowBytes() * bitmap->height();
texture->cleanup = true;
@@ -235,7 +235,7 @@ void TextureCache::generateTexture(SkBitmap* bitmap, Texture* texture, bool rege
texture->width = bitmap->width();
texture->height = bitmap->height();
- glBindTexture(GL_TEXTURE_2D, texture->id);
+ Caches::getInstance().bindTexture(texture->id);
switch (bitmap->getConfig()) {
case SkBitmap::kA8_Config: