summaryrefslogtreecommitdiff
path: root/libs/hwui/PathCache.cpp
diff options
context:
space:
mode:
author Romain Guy <romainguy@google.com> 2010-08-09 20:48:09 -0700
committer Romain Guy <romainguy@google.com> 2010-08-10 12:22:01 -0700
commit61c8c9c5b2006d18e9310b6521c65b36ffe75ce4 (patch)
treef2a792387a3177a2e7a25290ec48bd79c62ef3e6 /libs/hwui/PathCache.cpp
parent8cc82c6f4802937309dce6cba310e31358cdf6bf (diff)
Fix tons of bugs and add new text rendering support.
Change-Id: I326c66b10784006f6df2f12d38e120cef94cd0d7
Diffstat (limited to 'libs/hwui/PathCache.cpp')
-rw-r--r--libs/hwui/PathCache.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/hwui/PathCache.cpp b/libs/hwui/PathCache.cpp
index 4a01ffa554eb..9a22dc0a41e0 100644
--- a/libs/hwui/PathCache.cpp
+++ b/libs/hwui/PathCache.cpp
@@ -162,7 +162,8 @@ void PathCache::generateTexture(SkBitmap& bitmap, Texture* texture) {
glGenTextures(1, &texture->id);
glBindTexture(GL_TEXTURE_2D, texture->id);
- glPixelStorei(GL_UNPACK_ALIGNMENT, bitmap.bytesPerPixel());
+ // Textures are Alpha8
+ glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
texture->blend = true;
glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, bitmap.rowBytesAsPixels(), texture->height, 0,