diff options
| author | 2013-04-04 12:27:54 -0700 | |
|---|---|---|
| committer | 2013-04-04 12:27:54 -0700 | |
| commit | 0908764b2b3cf5075df4178a5f0a8547dcb7b317 (patch) | |
| tree | c69db8d815ad1d0b0172e7a20827254627800dad /libs/hwui/LayerRenderer.cpp | |
| parent | df1dc28ba0c63b195016ad0453fc58025ee82acb (diff) | |
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
Diffstat (limited to 'libs/hwui/LayerRenderer.cpp')
| -rw-r--r-- | libs/hwui/LayerRenderer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/hwui/LayerRenderer.cpp b/libs/hwui/LayerRenderer.cpp index 8451048e5622..3e55fffd93a9 100644 --- a/libs/hwui/LayerRenderer.cpp +++ b/libs/hwui/LayerRenderer.cpp @@ -256,7 +256,7 @@ Layer* LayerRenderer::createLayer(uint32_t width, uint32_t height, bool isOpaque // Initialize the texture if needed if (layer->isEmpty()) { layer->setEmpty(false); - layer->allocateTexture(GL_RGBA, GL_UNSIGNED_BYTE); + layer->allocateTexture(); // This should only happen if we run out of memory if (glGetError() != GL_NO_ERROR) { |