summaryrefslogtreecommitdiff
path: root/libs/hwui/GlopBuilder.cpp
diff options
context:
space:
mode:
author Chris Craik <ccraik@google.com> 2015-11-02 14:52:21 -0800
committer Chris Craik <ccraik@google.com> 2015-11-02 17:34:06 -0800
commit8d2cf943d9c7292e54726399faefdec4a01c084b (patch)
tree0b73f75520a8e0847b19b016af7bf3d87dc6c08c /libs/hwui/GlopBuilder.cpp
parent4f16073556f7978708fb71c87628cfe1692412d5 (diff)
Add region-tracking to OffscreenBuffers
Change-Id: I024c7219c080b9a89888517f5a89d49dfe8065ba
Diffstat (limited to 'libs/hwui/GlopBuilder.cpp')
-rw-r--r--libs/hwui/GlopBuilder.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/libs/hwui/GlopBuilder.cpp b/libs/hwui/GlopBuilder.cpp
index d2da8513ff56..f3ac93b89893 100644
--- a/libs/hwui/GlopBuilder.cpp
+++ b/libs/hwui/GlopBuilder.cpp
@@ -70,6 +70,20 @@ GlopBuilder::GlopBuilder(RenderState& renderState, Caches& caches, Glop* outGlop
// Mesh
////////////////////////////////////////////////////////////////////////////////
+GlopBuilder& GlopBuilder::setMeshTexturedIndexedVbo(GLuint vbo, GLsizei elementCount) {
+ TRIGGER_STAGE(kMeshStage);
+
+ mOutGlop->mesh.primitiveMode = GL_TRIANGLES;
+ mOutGlop->mesh.indices = { mRenderState.meshState().getQuadListIBO(), nullptr };
+ mOutGlop->mesh.vertices = {
+ vbo,
+ VertexAttribFlags::TextureCoord,
+ nullptr, nullptr, nullptr,
+ kTextureVertexStride };
+ mOutGlop->mesh.elementCount = elementCount;
+ return *this;
+}
+
GlopBuilder& GlopBuilder::setMeshUnitQuad() {
TRIGGER_STAGE(kMeshStage);