From 5d794412e3e429e47404395badcd11b0b8639e8b Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Wed, 13 Oct 2010 16:36:22 -0700 Subject: Small potential performance improvement for fonts rendering. Change-Id: If59c1e7803b84340fbc8b31ce6171ef0e5dc6189 --- libs/hwui/FontRenderer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libs/hwui') 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); -- cgit v1.1