diff options
Diffstat (limited to 'libs/rs/rsShaderCache.h')
-rw-r--r-- | libs/rs/rsShaderCache.h | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/libs/rs/rsShaderCache.h b/libs/rs/rsShaderCache.h index 6b49e5f..3540366 100644 --- a/libs/rs/rsShaderCache.h +++ b/libs/rs/rsShaderCache.h @@ -27,8 +27,7 @@ namespace renderscript { // An element is a group of Components that occupies one cell in a structure. -class ShaderCache -{ +class ShaderCache { public: ShaderCache(); virtual ~ShaderCache(); @@ -56,12 +55,12 @@ protected: UniformQueryData(uint32_t maxName) { name = NULL; nameLength = maxName; - if(nameLength > 0 ) { + if (nameLength > 0 ) { name = new char[nameLength]; } } ~UniformQueryData() { - if(name != NULL) { + if (name != NULL) { delete[] name; name = NULL; } @@ -80,26 +79,26 @@ protected: uint32_t numFragUnis) : vtx(0), frag(0), program(0), vtxAttrCount(0), vtxAttrs(0), vtxUniforms(0), fragUniforms(0) { vtxAttrCount = numVtxAttr; - if(numVtxAttr) { + if (numVtxAttr) { vtxAttrs = new AttrData[numVtxAttr]; } - if(numVtxUnis) { + if (numVtxUnis) { vtxUniforms = new UniformData[numVtxUnis]; } - if(numFragUnis) { + if (numFragUnis) { fragUniforms = new UniformData[numFragUnis]; } } ~ProgramEntry() { - if(vtxAttrs) { + if (vtxAttrs) { delete[] vtxAttrs; vtxAttrs = NULL; } - if(vtxUniforms) { + if (vtxUniforms) { delete[] vtxUniforms; vtxUniforms = NULL; } - if(fragUniforms) { + if (fragUniforms) { delete[] fragUniforms; fragUniforms = NULL; } @@ -111,7 +110,6 @@ protected: AttrData *vtxAttrs; UniformData *vtxUniforms; UniformData *fragUniforms; - }; Vector<ProgramEntry*> mEntries; ProgramEntry *mCurrent; |