From 8d2cf943d9c7292e54726399faefdec4a01c084b Mon Sep 17 00:00:00 2001 From: Chris Craik Date: Mon, 2 Nov 2015 14:52:21 -0800 Subject: Add region-tracking to OffscreenBuffers Change-Id: I024c7219c080b9a89888517f5a89d49dfe8065ba --- libs/hwui/GlopBuilder.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'libs/hwui/GlopBuilder.cpp') 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); -- cgit v1.2.3-59-g8ed1b