diff options
author | Romain Guy <romainguy@google.com> | 2010-10-13 16:36:22 -0700 |
---|---|---|
committer | Romain Guy <romainguy@google.com> | 2010-10-13 17:24:41 -0700 |
commit | 5d794412e3e429e47404395badcd11b0b8639e8b (patch) | |
tree | 8a51193f6132d76192665b44fe65a009a2ac3cff /libs/hwui | |
parent | 67a2f7b5a1b3ec5d2440d8be6e5ee4274e90e226 (diff) | |
download | frameworks_base-5d794412e3e429e47404395badcd11b0b8639e8b.zip frameworks_base-5d794412e3e429e47404395badcd11b0b8639e8b.tar.gz frameworks_base-5d794412e3e429e47404395badcd11b0b8639e8b.tar.bz2 |
Small potential performance improvement for fonts rendering.
Change-Id: If59c1e7803b84340fbc8b31ce6171ef0e5dc6189
Diffstat (limited to 'libs/hwui')
-rw-r--r-- | libs/hwui/FontRenderer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/hwui/FontRenderer.cpp b/libs/hwui/FontRenderer.cpp index 8389e56..1b21aee 100644 --- a/libs/hwui/FontRenderer.cpp +++ b/libs/hwui/FontRenderer.cpp @@ -482,9 +482,9 @@ void FontRenderer::initVertexArrayBuffers() { } glGenBuffers(1, &mIndexBufferID); - glBindBuffer(GL_ARRAY_BUFFER, mIndexBufferID); - glBufferData(GL_ARRAY_BUFFER, indexBufferSizeBytes, indexBufferData, GL_DYNAMIC_DRAW); - glBindBuffer(GL_ARRAY_BUFFER, 0); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, mIndexBufferID); + glBufferData(GL_ELEMENT_ARRAY_BUFFER, indexBufferSizeBytes, indexBufferData, GL_STATIC_DRAW); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); free(indexBufferData); |