Code cleanup to make formatting consistent
across all the renderscript files.
Change-Id: Idf5fcc60877e44c8f074f7176e37f70b3b895a3c
diff --git a/rsVertexArray.cpp b/rsVertexArray.cpp
index 8eb94d0..5062156 100644
--- a/rsVertexArray.cpp
+++ b/rsVertexArray.cpp
@@ -23,28 +23,22 @@
#include <OpenGL/gl.h>
#endif
-
using namespace android;
using namespace android::renderscript;
-
-VertexArray::VertexArray(const Attrib *attribs, uint32_t numAttribs)
-{
+VertexArray::VertexArray(const Attrib *attribs, uint32_t numAttribs) {
mAttribs = attribs;
mCount = numAttribs;
}
-VertexArray::~VertexArray()
-{
+VertexArray::~VertexArray() {
}
-VertexArray::Attrib::Attrib()
-{
+VertexArray::Attrib::Attrib() {
clear();
}
-void VertexArray::Attrib::clear()
-{
+void VertexArray::Attrib::clear() {
buffer = 0;
offset = 0;
type = 0;
@@ -55,8 +49,9 @@
name.setTo("");
}
-void VertexArray::Attrib::set(uint32_t type, uint32_t size, uint32_t stride, bool normalized, uint32_t offset, const char *name)
-{
+void VertexArray::Attrib::set(uint32_t type, uint32_t size, uint32_t stride,
+ bool normalized, uint32_t offset,
+ const char *name) {
clear();
this->type = type;
this->size = size;
@@ -67,7 +62,7 @@
}
void VertexArray::logAttrib(uint32_t idx, uint32_t slot) const {
- if(idx == 0) {
+ if (idx == 0) {
LOGV("Starting vertex attribute binding");
}
LOGV("va %i: slot=%i name=%s buf=%i ptr=%p size=%i type=0x%x stride=0x%x norm=%i offset=0x%x",
@@ -82,8 +77,9 @@
mAttribs[idx].offset);
}
-void VertexArray::setupGL2(const Context *rsc, class VertexArrayState *state, ShaderCache *sc) const
-{
+void VertexArray::setupGL2(const Context *rsc,
+ class VertexArrayState *state,
+ ShaderCache *sc) const {
rsc->checkError("VertexArray::setupGL2 start");
for (uint32_t ct=1; ct <= 0xf/*state->mLastEnableCount*/; ct++) {
glDisableVertexAttribArray(ct);
@@ -92,10 +88,10 @@
rsc->checkError("VertexArray::setupGL2 disabled");
for (uint32_t ct=0; ct < mCount; ct++) {
int32_t slot = sc->vtxAttribSlot(mAttribs[ct].name);
- if(rsc->props.mLogShadersAttr) {
+ if (rsc->props.mLogShadersAttr) {
logAttrib(ct, slot);
}
- if(slot < 0) {
+ if (slot < 0) {
continue;
}
glEnableVertexAttribArray(slot);