From 61c8c9c5b2006d18e9310b6521c65b36ffe75ce4 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Mon, 9 Aug 2010 20:48:09 -0700 Subject: Fix tons of bugs and add new text rendering support. Change-Id: I326c66b10784006f6df2f12d38e120cef94cd0d7 --- libs/hwui/PathCache.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libs/hwui/PathCache.cpp') 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, -- cgit v1.2.3-59-g8ed1b