diff options
author | skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-03-13 07:01:04 +0000 |
---|---|---|
committer | skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-03-13 07:01:04 +0000 |
commit | 91274b99722d9be62e077ab979c630c23cdd04b1 (patch) | |
tree | e53b67d2dd8d809520cbf9cd7ef63b35362c87f3 | |
parent | c19c19111c79f6a0cadcc1ec00527c0f940edd60 (diff) |
Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@8120 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | debugger/QT/SkDebuggerGUI.cpp | 2 | ||||
-rw-r--r-- | debugger/SkDebugger.cpp | 4 | ||||
-rw-r--r-- | debugger/SkDebugger.h | 2 | ||||
-rw-r--r-- | gyp/gpu.gypi | 2 | ||||
-rw-r--r-- | include/core/SkFontLCDConfig.h | 1 | ||||
-rw-r--r-- | include/gpu/GrEffect.h | 8 | ||||
-rw-r--r-- | include/gpu/GrEffectStage.h | 4 | ||||
-rw-r--r-- | include/gpu/GrTBackendEffectFactory.h | 2 | ||||
-rw-r--r-- | src/core/SkFontHost.cpp | 2 | ||||
-rw-r--r-- | src/core/SkPictureRecord.cpp | 12 | ||||
-rw-r--r-- | src/effects/SkBicubicImageFilter.cpp | 6 | ||||
-rw-r--r-- | src/gpu/GrContext.cpp | 4 | ||||
-rw-r--r-- | src/gpu/GrDrawState.cpp | 6 | ||||
-rw-r--r-- | src/gpu/GrDrawState.h | 8 | ||||
-rw-r--r-- | src/gpu/GrTextContext.cpp | 4 | ||||
-rw-r--r-- | src/gpu/effects/GrEllipseEdgeEffect.cpp | 4 | ||||
-rw-r--r-- | src/gpu/gl/GrGLProgram.cpp | 2 | ||||
-rw-r--r-- | src/gpu/gl/GrGLShaderBuilder.cpp | 4 | ||||
-rw-r--r-- | src/gpu/gl/GrGpuGL_program.cpp | 2 |
19 files changed, 38 insertions, 41 deletions
diff --git a/debugger/QT/SkDebuggerGUI.cpp b/debugger/QT/SkDebuggerGUI.cpp index 3d8efa41d8..27bf9c0fe8 100644 --- a/debugger/QT/SkDebuggerGUI.cpp +++ b/debugger/QT/SkDebuggerGUI.cpp @@ -1070,7 +1070,7 @@ void SkDebuggerGUI::setupListWidget(SkTArray<SkString>* command) { } } -void SkDebuggerGUI::setupOverviewText(const SkTDArray<double>* typeTimes, +void SkDebuggerGUI::setupOverviewText(const SkTDArray<double>* typeTimes, double totTime, int numRuns) { SkString overview; diff --git a/debugger/SkDebugger.cpp b/debugger/SkDebugger.cpp index b40e6ecef5..2d13c758d2 100644 --- a/debugger/SkDebugger.cpp +++ b/debugger/SkDebugger.cpp @@ -95,9 +95,9 @@ void SkDebugger::getOverviewText(const SkTDArray<double>* typeTimes, } #ifdef SK_DEBUG if (NULL != typeTimes) { - SkASSERT(SkScalarNearlyEqual(SkDoubleToScalar(totPercent), + SkASSERT(SkScalarNearlyEqual(SkDoubleToScalar(totPercent), SkDoubleToScalar(100.0))); - SkASSERT(SkScalarNearlyEqual(SkDoubleToScalar(tempSum), + SkASSERT(SkScalarNearlyEqual(SkDoubleToScalar(tempSum), SkDoubleToScalar(totTime))); } #endif diff --git a/debugger/SkDebugger.h b/debugger/SkDebugger.h index 1ca7b682ab..42356f8964 100644 --- a/debugger/SkDebugger.h +++ b/debugger/SkDebugger.h @@ -107,7 +107,7 @@ public: } } - void getOverviewText(const SkTDArray<double>* typeTimes, double totTime, + void getOverviewText(const SkTDArray<double>* typeTimes, double totTime, SkString* overview, int numRuns); private: diff --git a/gyp/gpu.gypi b/gyp/gpu.gypi index d9b4b22e07..d964f20a07 100644 --- a/gyp/gpu.gypi +++ b/gyp/gpu.gypi @@ -136,7 +136,7 @@ '<(skia_src_path)/gpu/effects/GrTextureDomainEffect.h', '<(skia_src_path)/gpu/effects/GrTextureStripAtlas.cpp', '<(skia_src_path)/gpu/effects/GrTextureStripAtlas.h', - + '<(skia_src_path)/gpu/gl/GrGLBufferImpl.cpp', '<(skia_src_path)/gpu/gl/GrGLBufferImpl.h', '<(skia_src_path)/gpu/gl/GrGLCaps.cpp', diff --git a/include/core/SkFontLCDConfig.h b/include/core/SkFontLCDConfig.h index 009e7cde0b..03ee09f8b5 100644 --- a/include/core/SkFontLCDConfig.h +++ b/include/core/SkFontLCDConfig.h @@ -56,4 +56,3 @@ public: }; #endif - diff --git a/include/gpu/GrEffect.h b/include/gpu/GrEffect.h index 2792476a6d..1b2604114d 100644 --- a/include/gpu/GrEffect.h +++ b/include/gpu/GrEffect.h @@ -177,15 +177,15 @@ public: protected: /** - * Subclasses call this from their constructor to register GrTextureAccesses. The effect - * subclass manages the lifetime of the accesses (this function only stores a pointer). This + * Subclasses call this from their constructor to register GrTextureAccesses. The effect + * subclass manages the lifetime of the accesses (this function only stores a pointer). This * must only be called from the constructor because GrEffects are immutable. */ void addTextureAccess(const GrTextureAccess* textureAccess); /** - * Subclasses call this from their constructor to register vertex attributes (at most - * kMaxVertexAttribs). This must only be called from the constructor because GrEffects are + * Subclasses call this from their constructor to register vertex attributes (at most + * kMaxVertexAttribs). This must only be called from the constructor because GrEffects are * immutable. */ void addVertexAttrib(GrSLType type); diff --git a/include/gpu/GrEffectStage.h b/include/gpu/GrEffectStage.h index 05bf40c4bc..ff118c384c 100644 --- a/include/gpu/GrEffectStage.h +++ b/include/gpu/GrEffectStage.h @@ -145,8 +145,8 @@ public: return false; } - if (!(*stage.getEffect())->isEqual(*fEffect)) { - return false; + if (!(*stage.getEffect())->isEqual(*fEffect)) { + return false; } return fCoordChangeMatrix == stage.fCoordChangeMatrix; diff --git a/include/gpu/GrTBackendEffectFactory.h b/include/gpu/GrTBackendEffectFactory.h index 72b2aeaa27..1b6f8167bf 100644 --- a/include/gpu/GrTBackendEffectFactory.h +++ b/include/gpu/GrTBackendEffectFactory.h @@ -46,7 +46,7 @@ public: static const EffectKey kIllegalAttribKeyMask = (uint16_t) (~((1U << kAttribKeyBits) - 1)); GrAssert(!(kIllegalAttribKeyMask & textureKey)); #endif - return fEffectClassID | (attribKey << (kEffectKeyBits+kTextureKeyBits)) | + return fEffectClassID | (attribKey << (kEffectKeyBits+kTextureKeyBits)) | (textureKey << kEffectKeyBits) | effectKey; } diff --git a/src/core/SkFontHost.cpp b/src/core/SkFontHost.cpp index d5b7341fe8..4f0dc8637d 100644 --- a/src/core/SkFontHost.cpp +++ b/src/core/SkFontHost.cpp @@ -46,5 +46,3 @@ SkFontHost::LCDOrder SkFontHost::GetSubpixelOrder() { void SkFontHost::SetSubpixelOrder(LCDOrder order) { SkFontLCDConfig::SetSubpixelOrder((SkFontLCDConfig::LCDOrder)order); } - - diff --git a/src/core/SkPictureRecord.cpp b/src/core/SkPictureRecord.cpp index 421c2bd960..45412fe881 100644 --- a/src/core/SkPictureRecord.cpp +++ b/src/core/SkPictureRecord.cpp @@ -227,7 +227,7 @@ static bool is_simple(const SkPaint& p) { } // CommandInfos are fed to the 'match' method and filled in with command -// information. +// information. struct CommandInfo { DrawType fActualOp; uint32_t fOffset; @@ -236,7 +236,7 @@ struct CommandInfo { /* * Attempt to match the provided pattern of commands starting at 'offset' - * in the byte stream and stopping at the end of the stream. Upon success, + * in the byte stream and stopping at the end of the stream. Upon success, * return true with all the pattern information filled out in the result * array (i.e., actual ops, offsets and sizes). * Note this method skips any NOOPs seen in the stream @@ -295,7 +295,7 @@ static bool merge_savelayer_paint_into_drawbitmp(SkWriter32* writer, const CommandInfo& dbmInfo); /* - * Restore has just been called (but not recorded), look back at the + * Restore has just been called (but not recorded), look back at the * matching save* and see if we are in the configuration: * SAVE_LAYER * DRAW_BITMAP|DRAW_BITMAP_MATRIX|DRAW_BITMAP_NINE|DRAW_BITMAP_RECT_TO_RECT @@ -345,9 +345,9 @@ static bool merge_savelayer_paint_into_drawbitmp(SkWriter32* writer, const CommandInfo& saveLayerInfo, const CommandInfo& dbmInfo) { SkASSERT(SAVE_LAYER == saveLayerInfo.fActualOp); - SkASSERT(DRAW_BITMAP == dbmInfo.fActualOp || + SkASSERT(DRAW_BITMAP == dbmInfo.fActualOp || DRAW_BITMAP_MATRIX == dbmInfo.fActualOp || - DRAW_BITMAP_NINE == dbmInfo.fActualOp || + DRAW_BITMAP_NINE == dbmInfo.fActualOp || DRAW_BITMAP_RECT_TO_RECT == dbmInfo.fActualOp); uint32_t dbmPaintOffset = getPaintOffset(dbmInfo.fActualOp, dbmInfo.fSize); @@ -410,7 +410,7 @@ static bool merge_savelayer_paint_into_drawbitmp(SkWriter32* writer, } /* - * Restore has just been called (but not recorded), look back at the + * Restore has just been called (but not recorded), look back at the * matching save* and see if we are in the configuration: * SAVE_LAYER * SAVE diff --git a/src/effects/SkBicubicImageFilter.cpp b/src/effects/SkBicubicImageFilter.cpp index 105519e4ec..f4d474d697 100644 --- a/src/effects/SkBicubicImageFilter.cpp +++ b/src/effects/SkBicubicImageFilter.cpp @@ -70,9 +70,9 @@ inline SkPMColor cubicBlend(const SkScalar c[16], SkScalar t, SkPMColor c0, SkPM SkScalar r = SkScalarMul(cc[0], SkGetPackedR32(c0)) + SkScalarMul(cc[1], SkGetPackedR32(c1)) + SkScalarMul(cc[2], SkGetPackedR32(c2)) + SkScalarMul(cc[3], SkGetPackedR32(c3)); SkScalar g = SkScalarMul(cc[0], SkGetPackedG32(c0)) + SkScalarMul(cc[1], SkGetPackedG32(c1)) + SkScalarMul(cc[2], SkGetPackedG32(c2)) + SkScalarMul(cc[3], SkGetPackedG32(c3)); SkScalar b = SkScalarMul(cc[0], SkGetPackedB32(c0)) + SkScalarMul(cc[1], SkGetPackedB32(c1)) + SkScalarMul(cc[2], SkGetPackedB32(c2)) + SkScalarMul(cc[3], SkGetPackedB32(c3)); - return SkPackARGB32(SkScalarRoundToInt(a), - SkScalarRoundToInt(SkScalarClampMax(r, a)), - SkScalarRoundToInt(SkScalarClampMax(g, a)), + return SkPackARGB32(SkScalarRoundToInt(a), + SkScalarRoundToInt(SkScalarClampMax(r, a)), + SkScalarRoundToInt(SkScalarClampMax(g, a)), SkScalarRoundToInt(SkScalarClampMax(b, a))); } diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp index 7c852124e8..271923aedf 100644 --- a/src/gpu/GrContext.cpp +++ b/src/gpu/GrContext.cpp @@ -1131,8 +1131,8 @@ void GrContext::internalDrawOval(const GrPaint& paint, drawState->setAttribBindings(GrDrawState::kDefault_AttribBindings); enum { - // the edge effects share this stage with glyph rendering - // (kGlyphMaskStage in GrTextContext) && SW path rendering + // the edge effects share this stage with glyph rendering + // (kGlyphMaskStage in GrTextContext) && SW path rendering // (kPathMaskStage in GrSWMaskHelper) kEdgeEffectStage = GrPaint::kTotalStages, }; diff --git a/src/gpu/GrDrawState.cpp b/src/gpu/GrDrawState.cpp index fddce41099..cd5fe1c0d6 100644 --- a/src/gpu/GrDrawState.cpp +++ b/src/gpu/GrDrawState.cpp @@ -142,7 +142,7 @@ bool GrDrawState::validateVertexAttribs() const { } // sentinel to make sure effects don't try to use built-in attributes - static const int kBuiltInAttributeType = 10000; + static const int kBuiltInAttributeType = 10000; // check our built-in indices if (fAttribIndices[kPosition_AttribIndex] >= kVertexAttribCnt) { @@ -177,7 +177,7 @@ bool GrDrawState::validateVertexAttribs() const { } // now those set by effects - for (int s = 0; s < kNumStages; ++s) { + for (int s = 0; s < kNumStages; ++s) { const GrEffectStage& stage = fStages[s]; const GrEffectRef* effect = stage.getEffect(); if (effect == NULL) { @@ -199,7 +199,7 @@ bool GrDrawState::validateVertexAttribs() const { } GrSLType attributeType = effect->get()->vertexAttribType(i); - if (attributeTypes[attributeIndex] != -1 && + if (attributeTypes[attributeIndex] != -1 && attributeTypes[attributeIndex] != attributeType) { return false; } diff --git a/src/gpu/GrDrawState.h b/src/gpu/GrDrawState.h index 220e290a83..4e9747d755 100644 --- a/src/gpu/GrDrawState.h +++ b/src/gpu/GrDrawState.h @@ -334,7 +334,7 @@ public: bool hasSolidCoverage(GrAttribBindings) const; static void VertexAttributesUnitTest(); - + /// @} /////////////////////////////////////////////////////////////////////////// @@ -485,7 +485,7 @@ public: /// @name Effect Stages //// - const GrEffectRef* setEffect(int stageIdx, const GrEffectRef* effect, + const GrEffectRef* setEffect(int stageIdx, const GrEffectRef* effect, const int* indices = NULL) { fStages[stageIdx].setEffect(effect, indices); return effect; @@ -517,8 +517,8 @@ public: return true; } - void disableStage(int stageIdx) { - this->setEffect(stageIdx, NULL, NULL); + void disableStage(int stageIdx) { + this->setEffect(stageIdx, NULL, NULL); } /** diff --git a/src/gpu/GrTextContext.cpp b/src/gpu/GrTextContext.cpp index a8defcb4ba..5ff13b0fdc 100644 --- a/src/gpu/GrTextContext.cpp +++ b/src/gpu/GrTextContext.cpp @@ -19,8 +19,8 @@ #include "SkStrokeRec.h" enum { - // glyph rendering shares this stage with edge rendering - // (kEdgeEffectStage in GrContext) && SW path rendering + // glyph rendering shares this stage with edge rendering + // (kEdgeEffectStage in GrContext) && SW path rendering // (kPathMaskStage in GrSWMaskHelper) kGlyphMaskStage = GrPaint::kTotalStages, }; diff --git a/src/gpu/effects/GrEllipseEdgeEffect.cpp b/src/gpu/effects/GrEllipseEdgeEffect.cpp index 002753e203..18301e9999 100644 --- a/src/gpu/effects/GrEllipseEdgeEffect.cpp +++ b/src/gpu/effects/GrEllipseEdgeEffect.cpp @@ -30,12 +30,12 @@ public: const SkString* attrName = builder->getEffectAttributeName(stage.getVertexAttribIndices()[0]); builder->vsCodeAppendf("\t%s = %s;\n", vsName, attrName->c_str()); - + builder->fsCodeAppend("\tfloat edgeAlpha;\n"); // translate to origin builder->fsCodeAppendf("\tvec2 offset = (%s.xy - %s.xy);\n", builder->fragmentPosition(), fsName); // scale y by xRadius/yRadius - builder->fsCodeAppendf("\toffset.y *= %s.w;\n", fsName); + builder->fsCodeAppendf("\toffset.y *= %s.w;\n", fsName); builder->fsCodeAppend("\tfloat d = length(offset);\n"); // compare length against xRadius builder->fsCodeAppendf("\tedgeAlpha = smoothstep(d - 0.5, d + 0.5, %s.z);\n", fsName); diff --git a/src/gpu/gl/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp index c1643578ad..850f0bb134 100644 --- a/src/gpu/gl/GrGLProgram.cpp +++ b/src/gpu/gl/GrGLProgram.cpp @@ -1013,7 +1013,7 @@ bool GrGLProgram::bindOutputsAttribsAndLinkProgram(const GrGLShaderBuilder& buil } const GrGLShaderBuilder::AttributePair* attribEnd = builder.getEffectAttributes().end(); - for (const GrGLShaderBuilder::AttributePair* attrib = builder.getEffectAttributes().begin(); + for (const GrGLShaderBuilder::AttributePair* attrib = builder.getEffectAttributes().begin(); attrib != attribEnd; ++attrib) { GL_CALL(BindAttribLocation(fProgramID, attrib->fIndex, attrib->fName.c_str())); diff --git a/src/gpu/gl/GrGLShaderBuilder.cpp b/src/gpu/gl/GrGLShaderBuilder.cpp index 1a238ae04b..b3b09cc477 100644 --- a/src/gpu/gl/GrGLShaderBuilder.cpp +++ b/src/gpu/gl/GrGLShaderBuilder.cpp @@ -539,13 +539,13 @@ GrGLEffect* GrGLShaderBuilder::createAndEmitGLEffect( const SkString* GrGLShaderBuilder::getEffectAttributeName(int attributeIndex) const { const AttributePair* attribEnd = this->getEffectAttributes().end(); - for (const AttributePair* attrib = this->getEffectAttributes().begin(); + for (const AttributePair* attrib = this->getEffectAttributes().begin(); attrib != attribEnd; ++attrib) { if (attrib->fIndex == attributeIndex) { return &attrib->fName; } - } + } return NULL; } diff --git a/src/gpu/gl/GrGpuGL_program.cpp b/src/gpu/gl/GrGpuGL_program.cpp index a717b8650b..5081089216 100644 --- a/src/gpu/gl/GrGpuGL_program.cpp +++ b/src/gpu/gl/GrGpuGL_program.cpp @@ -19,7 +19,7 @@ static const UniformHandle kInvalidUniformHandle = GrGLUniformManager::kInvalidU GrGpuGL::ProgramCache::ProgramCache(const GrGLContext& gl) : fCount(0) , fCurrLRUStamp(0) - , fGL(gl) + , fGL(gl) #ifdef PROGRAM_CACHE_STATS , fTotalRequests(0) , fCacheMisses(0) |