diff options
| author | Romain Guy <romainguy@google.com> | 2011-12-12 20:35:21 -0800 |
|---|---|---|
| committer | Romain Guy <romainguy@google.com> | 2011-12-12 20:35:21 -0800 |
| commit | f3a910b423db7ad79cf61518bdd9278c048ad0d8 (patch) | |
| tree | a0ae14d597ee14202ec6ca60cedfb446ff470379 /libs/hwui/FontRenderer.cpp | |
| parent | d71dd367af604571c7d00ca473184a1b9240eca2 (diff) | |
| download | frameworks_base-f3a910b423db7ad79cf61518bdd9278c048ad0d8.zip frameworks_base-f3a910b423db7ad79cf61518bdd9278c048ad0d8.tar.gz frameworks_base-f3a910b423db7ad79cf61518bdd9278c048ad0d8.tar.bz2 | |
Optimize state changes
Change-Id: Iae59bc8dfd6427d0967472462cc1994987092827
Diffstat (limited to 'libs/hwui/FontRenderer.cpp')
| -rw-r--r-- | libs/hwui/FontRenderer.cpp | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/libs/hwui/FontRenderer.cpp b/libs/hwui/FontRenderer.cpp index 6e80d15..f04ea6f 100644 --- a/libs/hwui/FontRenderer.cpp +++ b/libs/hwui/FontRenderer.cpp @@ -325,8 +325,6 @@ FontRenderer::FontRenderer() { mTextTexture = NULL; mIndexBufferID = 0; - mPositionAttrSlot = -1; - mTexcoordAttrSlot = -1; mCacheWidth = DEFAULT_TEXT_CACHE_WIDTH; mCacheHeight = DEFAULT_TEXT_CACHE_HEIGHT; @@ -599,12 +597,6 @@ void FontRenderer::checkTextureUpdate() { void FontRenderer::issueDrawCommand() { checkTextureUpdate(); - float* vtx = mTextMeshPtr; - float* tex = vtx + 2; - - glVertexAttribPointer(mPositionAttrSlot, 2, GL_FLOAT, GL_FALSE, 16, vtx); - glVertexAttribPointer(mTexcoordAttrSlot, 2, GL_FLOAT, GL_FALSE, 16, tex); - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, mIndexBufferID); glDrawElements(GL_TRIANGLES, mCurrentQuadIndex * 6, GL_UNSIGNED_SHORT, NULL); @@ -760,11 +752,6 @@ bool FontRenderer::renderText(SkPaint* paint, const Rect* clip, const char *text return false; } - if (mPositionAttrSlot < 0 || mTexcoordAttrSlot < 0) { - LOGE("Font renderer unable to draw, attribute slots undefined"); - return false; - } - mDrawn = false; mBounds = bounds; mClip = clip; |
