summaryrefslogtreecommitdiff
path: root/libs/hwui/OpenGLRenderer.cpp
diff options
context:
space:
mode:
author Alex Sakhartchouk <alexst@google.com> 2011-02-17 16:45:37 -0800
committer Alex Sakhartchouk <alexst@google.com> 2011-02-17 16:45:37 -0800
commit894df17eee708688c8a6e67941add2017239c790 (patch)
tree6bdce5bbcd62d824227c9e9f30e78db40bba5988 /libs/hwui/OpenGLRenderer.cpp
parent2e10374dceea41ebab13e5d2834f6767f2c23b3d (diff)
Fixing font renderer attribute slot locations.
Change-Id: I6377bb641df7d8372d873c00790189f9a190afd6
Diffstat (limited to 'libs/hwui/OpenGLRenderer.cpp')
-rw-r--r--libs/hwui/OpenGLRenderer.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index 68b54febf956..4a08f533df6f 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -1585,8 +1585,12 @@ void OpenGLRenderer::drawText(const char* text, int bytesCount, int count,
#else
bool hasActiveLayer = false;
#endif
-
mCaches.unbindMeshBuffer();
+
+ // Tell font renderer the locations of position and texture coord
+ // attributes so it can bind its data properly
+ int positionSlot = mCaches.currentProgram->position;
+ fontRenderer.setAttributeBindingSlots(positionSlot, mTexCoordsSlot);
if (fontRenderer.renderText(paint, clip, text, 0, bytesCount, count, x, y,
hasActiveLayer ? &bounds : NULL)) {
#if RENDER_LAYERS_AS_REGIONS