Small optimization to VertexDataManager.
Avoid calling a getter repeatedly in a loop, when we can instead
store a local reference to an array.
BUG=angleproject:959
Change-Id: I507ad1a6cf3bb6183dd3499df024dfec6950a6c8
Reviewed-on: https://chromium-review.googlesource.com/277285
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/Program.cpp b/src/libANGLE/Program.cpp
index cb748c0..b472201 100644
--- a/src/libANGLE/Program.cpp
+++ b/src/libANGLE/Program.cpp
@@ -594,7 +594,7 @@
return mProgram->getSemanticIndexes();
}
-int Program::getSemanticIndex(int attributeIndex)
+int Program::getSemanticIndex(int attributeIndex) const
{
ASSERT(attributeIndex >= 0 && attributeIndex < MAX_VERTEX_ATTRIBS);