summaryrefslogtreecommitdiff
path: root/libs/hwui/font/CacheTexture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/font/CacheTexture.cpp')
-rw-r--r--libs/hwui/font/CacheTexture.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/libs/hwui/font/CacheTexture.cpp b/libs/hwui/font/CacheTexture.cpp
index 49e9f65582ae..e2844ad0649a 100644
--- a/libs/hwui/font/CacheTexture.cpp
+++ b/libs/hwui/font/CacheTexture.cpp
@@ -180,7 +180,12 @@ void CacheTexture::allocatePixelBuffer() {
mPixelBuffer = PixelBuffer::create(mFormat, getWidth(), getHeight());
}
- mTexture.resize(mWidth, mHeight, mFormat);
+ GLint internalFormat = mFormat;
+ if (mFormat == GL_RGBA) {
+ internalFormat = mCaches.rgbaInternalFormat();
+ }
+
+ mTexture.resize(mWidth, mHeight, internalFormat, mFormat);
mTexture.setFilter(getLinearFiltering() ? GL_LINEAR : GL_NEAREST);
mTexture.setWrap(GL_CLAMP_TO_EDGE);
}