diff options
author | Romain Guy <romainguy@google.com> | 2013-02-13 18:39:43 -0800 |
---|---|---|
committer | Romain Guy <romainguy@google.com> | 2013-02-13 18:39:43 -0800 |
commit | ff316ec7a76e52572a2e89b691e6b3bba0cafba3 (patch) | |
tree | 8418a45b809c9382a0fc3d9d9bb6db6a537dd4cc /libs/hwui/Caches.cpp | |
parent | 2b44eb75c42e4caa94f0b002f0ea9e134fe7b543 (diff) | |
download | frameworks_base-ff316ec7a76e52572a2e89b691e6b3bba0cafba3.zip frameworks_base-ff316ec7a76e52572a2e89b691e6b3bba0cafba3.tar.gz frameworks_base-ff316ec7a76e52572a2e89b691e6b3bba0cafba3.tar.bz2 |
Implement support for drawBitmapMesh's colors array
Change-Id: I3d901f6267c2918771ac30ff55c8d80c3ab5b725
Diffstat (limited to 'libs/hwui/Caches.cpp')
-rw-r--r-- | libs/hwui/Caches.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libs/hwui/Caches.cpp b/libs/hwui/Caches.cpp index 74201d1..88f1d83 100644 --- a/libs/hwui/Caches.cpp +++ b/libs/hwui/Caches.cpp @@ -365,11 +365,12 @@ void Caches::bindPositionVertexPointer(bool force, GLvoid* vertices, GLsizei str } } -void Caches::bindTexCoordsVertexPointer(bool force, GLvoid* vertices) { - if (force || vertices != mCurrentTexCoordsPointer) { +void Caches::bindTexCoordsVertexPointer(bool force, GLvoid* vertices, GLsizei stride) { + if (force || vertices != mCurrentTexCoordsPointer || stride != mCurrentTexCoordsStride) { GLuint slot = currentProgram->texCoords; - glVertexAttribPointer(slot, 2, GL_FLOAT, GL_FALSE, gMeshStride, vertices); + glVertexAttribPointer(slot, 2, GL_FLOAT, GL_FALSE, stride, vertices); mCurrentTexCoordsPointer = vertices; + mCurrentTexCoordsStride = stride; } } @@ -390,7 +391,7 @@ void Caches::enableTexCoordsVertexArray() { } } -void Caches::disbaleTexCoordsVertexArray() { +void Caches::disableTexCoordsVertexArray() { if (mTexCoordsArrayEnabled) { glDisableVertexAttribArray(Program::kBindingTexCoords); mTexCoordsArrayEnabled = false; |