diff options
author | Romain Guy <romainguy@google.com> | 2013-06-04 18:00:09 -0700 |
---|---|---|
committer | Romain Guy <romainguy@google.com> | 2013-06-04 18:58:36 -0700 |
commit | 8aa195d7081b889f3a7b1f426cbd8556377aae5e (patch) | |
tree | 6cd0ab4181c25d3113c4e39b49e8f8a0c7d12b8b /libs/hwui/Image.cpp | |
parent | 84f3c5689cffbfc1e45a0101d5bb636323769f54 (diff) | |
download | frameworks_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/Image.cpp')
-rw-r--r-- | libs/hwui/Image.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/hwui/Image.cpp b/libs/hwui/Image.cpp index 35ca40d..77c2300 100644 --- a/libs/hwui/Image.cpp +++ b/libs/hwui/Image.cpp @@ -18,6 +18,7 @@ #include <utils/Log.h> +#include "Caches.h" #include "Image.h" namespace android { @@ -38,7 +39,7 @@ Image::Image(sp<GraphicBuffer> buffer) { } else { // Create a 2D texture to sample from the EGLImage glGenTextures(1, &mTexture); - glBindTexture(GL_TEXTURE_2D, mTexture); + Caches::getInstance().bindTexture(mTexture); glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, mImage); GLenum status = GL_NO_ERROR; |