зеркало из https://github.com/mozilla/moz-skia.git
Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@9252 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
Родитель
f0656c140a
Коммит
2d816ad36e
|
@ -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);
|
||||
|
|
|
@ -64,7 +64,7 @@ static const char gCode[] = ""
|
|||
class LuaView : public SampleView {
|
||||
public:
|
||||
LuaView() : fLua(NULL) {}
|
||||
|
||||
|
||||
virtual ~LuaView() {
|
||||
SkDELETE(fLua);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче