From 0908764b2b3cf5075df4178a5f0a8547dcb7b317 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Thu, 4 Apr 2013 12:27:54 -0700 Subject: First OpenGL ES 3.0 based optimization This change uses a new OpenGL ES 3.0 feature to upload less data when the font cache needs to be update. This can result in significant performance improvements on device with large textures or with locales that use a lot of glyphs (CJK for instance.) This change also fixes various unpack alignment issues. The unpack alignment, as well as the unpack row length, is not texture specific but a global state that affect all glTex/SubImage2D calls. Some of them were missing the appropriate glPixelStorei() call. This could result in corrupted textures. Change-Id: Iefb429d4d0d0b4e0faeadf27daafee6d30a21d85 --- libs/hwui/OpenGLRenderer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/hwui/OpenGLRenderer.cpp') diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index 4a5785c02bea..046bcfdec01d 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -921,7 +921,7 @@ bool OpenGLRenderer::createFboLayer(Layer* layer, Rect& bounds, Rect& clip, GLui // Initialize the texture if needed if (layer->isEmpty()) { - layer->allocateTexture(GL_RGBA, GL_UNSIGNED_BYTE); + layer->allocateTexture(); layer->setEmpty(false); } -- cgit v1.2.3-59-g8ed1b