diff options
author | skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-05-23 07:01:22 +0000 |
---|---|---|
committer | skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-05-23 07:01:22 +0000 |
commit | 2d816ad36e806e5b1cf3c447e547829bbbe74fd1 (patch) | |
tree | ce49acf0a183080f1c486726b290ae5a8a56432e | |
parent | f0656c140aa3dcbfb250433045e803b2b99f4cab (diff) |
Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@9252 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | include/utils/SkLua.h | 4 | ||||
-rw-r--r-- | samplecode/SampleLua.cpp | 2 | ||||
-rw-r--r-- | src/gpu/gl/GrGLProgramDesc.cpp | 7 | ||||
-rw-r--r-- | src/gpu/gl/GrGLProgramDesc.h | 4 | ||||
-rw-r--r-- | src/gpu/gl/GrGpuGL_program.cpp | 2 | ||||
-rw-r--r-- | src/utils/SkLua.cpp | 9 |
6 files changed, 13 insertions, 15 deletions
diff --git a/include/utils/SkLua.h b/include/utils/SkLua.h index 8f48bc1ee1..f24f8a5d2f 100644 --- a/include/utils/SkLua.h +++ b/include/utils/SkLua.h @@ -35,10 +35,10 @@ public: lua_State* get() const { return fL; } lua_State* operator*() const { return fL; } lua_State* operator->() const { return fL; } - + bool runCode(const char code[]); bool runCode(const void* code, size_t size); - + void pushBool(bool, const char tableKey[] = NULL); void pushString(const char[], const char tableKey[] = NULL); void pushString(const SkString&, const char tableKey[] = NULL); diff --git a/samplecode/SampleLua.cpp b/samplecode/SampleLua.cpp index 5b6be55ecc..1ad89f9d54 100644 --- a/samplecode/SampleLua.cpp +++ b/samplecode/SampleLua.cpp @@ -64,7 +64,7 @@ static const char gCode[] = "" class LuaView : public SampleView { public: LuaView() : fLua(NULL) {} - + virtual ~LuaView() { SkDELETE(fLua); } diff --git a/src/gpu/gl/GrGLProgramDesc.cpp b/src/gpu/gl/GrGLProgramDesc.cpp index 276f9b5a09..d040658a66 100644 --- a/src/gpu/gl/GrGLProgramDesc.cpp +++ b/src/gpu/gl/GrGLProgramDesc.cpp @@ -159,7 +159,7 @@ void GrGLProgramDesc::Build(const GrDrawState& drawState, // Record attribute indices header->fPositionAttributeIndex = drawState.positionAttributeIndex(); header->fLocalCoordAttributeIndex = drawState.localCoordAttributeIndex(); - + // For constant color and coverage we need an attribute with an index beyond those already set int availableAttributeIndex = drawState.getVertexAttribCount(); if (requiresColorAttrib) { @@ -171,7 +171,7 @@ void GrGLProgramDesc::Build(const GrDrawState& drawState, } else { header->fColorAttributeIndex = -1; } - + if (requiresCoverageAttrib) { header->fCoverageAttributeIndex = drawState.coverageVertexAttributeIndex(); } else if (GrGLProgramDesc::kAttribute_ColorInput == header->fCoverageInput) { @@ -182,7 +182,7 @@ void GrGLProgramDesc::Build(const GrDrawState& drawState, } // Here we deal with whether/how we handle color and coverage separately. - + // Set these defaults and then possibly change our mind if there is coverage. header->fDiscardIfZeroCoverage = false; header->fCoverageOutput = kModulate_CoverageOutput; @@ -247,4 +247,3 @@ GrGLProgramDesc& GrGLProgramDesc::operator= (const GrGLProgramDesc& other) { } return *this; } - diff --git a/src/gpu/gl/GrGLProgramDesc.h b/src/gpu/gl/GrGLProgramDesc.h index f83275dd46..0cf3b22b62 100644 --- a/src/gpu/gl/GrGLProgramDesc.h +++ b/src/gpu/gl/GrGLProgramDesc.h @@ -28,7 +28,7 @@ public: GrGLProgramDesc() : fInitialized(false) {} GrGLProgramDesc(const GrGLProgramDesc& desc) { *this = desc; } - // Returns this as a uint32_t array to be used as a key in the program cache. + // Returns this as a uint32_t array to be used as a key in the program cache. const uint32_t* asKey() const { GrAssert(fInitialized); return reinterpret_cast<const uint32_t*>(fKey.get()); @@ -164,7 +164,7 @@ private: int8_t fLocalCoordAttributeIndex; int8_t fColorAttributeIndex; int8_t fCoverageAttributeIndex; - + int8_t fColorEffectCnt; int8_t fCoverageEffectCnt; }; diff --git a/src/gpu/gl/GrGpuGL_program.cpp b/src/gpu/gl/GrGpuGL_program.cpp index b017d5de40..5dab982a8d 100644 --- a/src/gpu/gl/GrGpuGL_program.cpp +++ b/src/gpu/gl/GrGpuGL_program.cpp @@ -144,7 +144,7 @@ GrGLProgram* GrGpuGL::ProgramCache::getProgram(const GrGLProgramDesc& desc, } GrAssert(fEntries[purgeIdx] == entry); entry->fProgram.reset(program); - // We need to shift fEntries around so that the entry currently at purgeIdx is placed + // We need to shift fEntries around so that the entry currently at purgeIdx is placed // just before the entry at ~entryIdx (in order to keep fEntries sorted by descriptor). entryIdx = ~entryIdx; if (entryIdx < purgeIdx) { diff --git a/src/utils/SkLua.cpp b/src/utils/SkLua.cpp index ca6f493f57..9aef50e98c 100644 --- a/src/utils/SkLua.cpp +++ b/src/utils/SkLua.cpp @@ -195,7 +195,7 @@ static SkScalar getfield_scalar(lua_State* L, int index, const char key[]) { SkASSERT(lua_istable(L, index)); lua_pushstring(L, key); lua_gettable(L, index); - + SkScalar value = lua2scalar(L, -1); lua_pop(L, 1); return value; @@ -492,18 +492,18 @@ public: int t = lua_type(L, -1); SkDebugf("--- expected function %d\n", t); } - + lua_newtable(L); setfield_string(L, "verb", verb); } - + ~AutoCallLua() { if (lua_pcall(fL, 1, 0, 0) != LUA_OK) { SkDebugf("lua err: %s\n", lua_tostring(fL, -1)); } lua_settop(fL, -1); } - + private: lua_State* fL; }; @@ -563,4 +563,3 @@ void SkLua::Load(lua_State* L) { REG_CLASS(L, SkPaint); REG_CLASS(L, SkRRect); } - |