summaryrefslogtreecommitdiff
path: root/libs/hwui/renderstate/MeshState.cpp
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2015-03-09 14:17:29 -0700
committerChris Craik <ccraik@google.com>2015-03-09 18:06:32 -0700
commit182952f5eeefc2a21d76d4664ada0e2d78c1105c (patch)
treee2f1792de42f8d80d5843c3414cdfe7f1cd98c6a /libs/hwui/renderstate/MeshState.cpp
parentbe331a3809b9cf921c6ad65e1d671b24e97dded9 (diff)
Glop based composeLayerRegion/Rect
Change-Id: I69440cabca84948e8aaead9479d616ebc2496517
Diffstat (limited to 'libs/hwui/renderstate/MeshState.cpp')
-rw-r--r--libs/hwui/renderstate/MeshState.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/libs/hwui/renderstate/MeshState.cpp b/libs/hwui/renderstate/MeshState.cpp
index 6b0002034e3f..0521f6573e39 100644
--- a/libs/hwui/renderstate/MeshState.cpp
+++ b/libs/hwui/renderstate/MeshState.cpp
@@ -37,7 +37,7 @@ MeshState::MeshState()
mCurrentBuffer = mUnitQuadBuffer;
- std::unique_ptr<uint16_t[]> regionIndices(new uint16_t[kMaxNumberOfQuads * 6]);
+ uint16_t regionIndices[kMaxNumberOfQuads * 6];
for (uint32_t i = 0; i < kMaxNumberOfQuads; i++) {
uint16_t quad = i * 4;
int index = i * 6;
@@ -50,8 +50,7 @@ MeshState::MeshState()
}
glGenBuffers(1, &mQuadListIndices);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, mQuadListIndices);
- glBufferData(GL_ELEMENT_ARRAY_BUFFER, kMaxNumberOfQuads * 6 * sizeof(uint16_t),
- regionIndices.get(), GL_STATIC_DRAW);
+ glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(regionIndices), regionIndices, GL_STATIC_DRAW);
mCurrentIndicesBuffer = mQuadListIndices;
// position attribute always enabled