From b3ec29d2d81ae391e433fbdf8aabc791e426ee38 Mon Sep 17 00:00:00 2001 From: "skia.committer@gmail.com" Date: Sat, 7 Sep 2013 07:01:16 +0000 Subject: [PATCH] Sanitizing source files in Housekeeper-Nightly git-svn-id: http://skia.googlecode.com/svn/trunk@11143 2bbb7eff-a529-9590-31e7-b0007b416f81 --- bench/BlurBench.cpp | 8 ++++---- bench/BlurRectBench.cpp | 4 ++-- gm/bitmapalphathreshold.cpp | 10 +++++----- gm/blurrect.cpp | 8 ++++---- gm/circles.cpp | 4 ++-- gm/rects.cpp | 4 ++-- samplecode/SampleEffects.cpp | 2 +- samplecode/SampleFuzz.cpp | 6 +++--- samplecode/SampleTiling.cpp | 2 +- src/animator/SkDrawBlur.cpp | 2 +- src/effects/SkBitmapAlphaThresholdShader.cpp | 12 ++++++------ tests/PaintTest.cpp | 2 +- 12 files changed, 32 insertions(+), 32 deletions(-) diff --git a/bench/BlurBench.cpp b/bench/BlurBench.cpp index a66dac097e..54e7dfdb02 100644 --- a/bench/BlurBench.cpp +++ b/bench/BlurBench.cpp @@ -33,13 +33,13 @@ class BlurBench : public SkBenchmark { SkString fName; public: - BlurBench(void* param, SkScalar rad, SkBlurMaskFilter::BlurStyle bs, uint32_t flags = 0) + BlurBench(void* param, SkScalar rad, SkBlurMaskFilter::BlurStyle bs, uint32_t flags = 0) : INHERITED(param) { fRadius = rad; fStyle = bs; fFlags = flags; const char* name = rad > 0 ? gStyleName[bs] : "none"; - const char* quality = flags & SkBlurMaskFilter::kHighQuality_BlurFlag ? "high_quality" + const char* quality = flags & SkBlurMaskFilter::kHighQuality_BlurFlag ? "high_quality" : "low_quality"; if (SkScalarFraction(rad) != 0) { fName.printf("blur_%.2f_%s_%s", SkScalarToFloat(rad), name, quality); @@ -66,8 +66,8 @@ protected: r.offset(fRadius, fRadius); if (fRadius > 0) { - SkMaskFilter* mf = SkBlurMaskFilter::Create(fStyle, - SkBlurMask::ConvertRadiusToSigma(fRadius), + SkMaskFilter* mf = SkBlurMaskFilter::Create(fStyle, + SkBlurMask::ConvertRadiusToSigma(fRadius), fFlags); paint.setMaskFilter(mf)->unref(); } diff --git a/bench/BlurRectBench.cpp b/bench/BlurRectBench.cpp index 5c93cd5d1a..ccff8e3854 100644 --- a/bench/BlurRectBench.cpp +++ b/bench/BlurRectBench.cpp @@ -90,7 +90,7 @@ class BlurRectDirectBench: public BlurRectBench { protected: virtual void makeBlurryRect(const SkRect& r) SK_OVERRIDE { SkMask mask; - SkBlurMask::BlurRect(SkBlurMask::ConvertRadiusToSigma(this->radius()), + SkBlurMask::BlurRect(SkBlurMask::ConvertRadiusToSigma(this->radius()), &mask, r, SkBlurMask::kNormal_Style); SkMask::FreeImage(mask.fImage); } @@ -164,7 +164,7 @@ public: } else { name.printf("blurrect_gaussian_%d", SkScalarRoundToInt(rad)); } - + this->setName(name); } diff --git a/gm/bitmapalphathreshold.cpp b/gm/bitmapalphathreshold.cpp index 8af49fe351..e1413969f2 100644 --- a/gm/bitmapalphathreshold.cpp +++ b/gm/bitmapalphathreshold.cpp @@ -21,7 +21,7 @@ private: virtual uint32_t onGetFlags() const SK_OVERRIDE { // narrow this flags when the shader has a CPU implementation and // when it serializes. - return + return kSkipPDF_Flag | kSkipPicture_Flag | kSkipPipe_Flag | @@ -62,10 +62,10 @@ private: SkPath batPath; SkParsePath::FromSVGString( "M305.214,374.779c2.463,0,3.45,0.493,3.45,0.493l1.478-6.241c0,0,1.15,4.763,1.643,9.034" - "c0.493,4.271,8.048,1.479,14.454,0.164c6.405-1.314,7.72-11.662,7.72-11.662h59.294c0,0-35.807,10.841-26.772,34.656" - "c0,0-52.889-8.048-61.101,24.967h-0.001c-8.212-33.015-61.101-24.967-61.101-24.967c9.034-23.815-26.772-34.656-26.772-34.656" - "h59.294c0,0,1.314,10.348,7.719,11.662c6.406,1.314,13.962,4.106,14.454-0.164c0.493-4.271,1.643-9.034,1.643-9.034l1.479,6.241" - "c0,0,0.985-0.493,3.449-0.493H305.214L305.214,374.779z", + "c0.493,4.271,8.048,1.479,14.454,0.164c6.405-1.314,7.72-11.662,7.72-11.662h59.294c0,0-35.807,10.841-26.772,34.656" + "c0,0-52.889-8.048-61.101,24.967h-0.001c-8.212-33.015-61.101-24.967-61.101-24.967c9.034-23.815-26.772-34.656-26.772-34.656" + "h59.294c0,0,1.314,10.348,7.719,11.662c6.406,1.314,13.962,4.106,14.454-0.164c0.493-4.271,1.643-9.034,1.643-9.034l1.479,6.241" + "c0,0,0.985-0.493,3.449-0.493H305.214L305.214,374.779z", &batPath); SkMatrix matrix; diff --git a/gm/blurrect.cpp b/gm/blurrect.cpp index 40bbf71f8c..5e31a1ca74 100644 --- a/gm/blurrect.cpp +++ b/gm/blurrect.cpp @@ -141,8 +141,8 @@ class BlurRectCompareGM : public skiagm::GM { SkScalar fRadius; SkBlurMask::Style fStyle; public: - BlurRectCompareGM(const char name[], unsigned int rectWidth, - unsigned int rectHeight, float radius, + BlurRectCompareGM(const char name[], unsigned int rectWidth, + unsigned int rectHeight, float radius, SkBlurMask::Style style) : fName(name) , fRectWidth(rectWidth) @@ -244,8 +244,8 @@ protected: memset(src.fImage, 0xff, src.computeTotalImageSize()); - return SkBlurMask::BoxBlur(m, src, - SkBlurMask::ConvertRadiusToSigma(this->radius()), + return SkBlurMask::BoxBlur(m, src, + SkBlurMask::ConvertRadiusToSigma(this->radius()), this->style(), this->getQuality()); } diff --git a/gm/circles.cpp b/gm/circles.cpp index a1aff75460..f57463954c 100644 --- a/gm/circles.cpp +++ b/gm/circles.cpp @@ -81,8 +81,8 @@ protected: SkPaint p; p.setAntiAlias(true); SkBlurDrawLooper* shadowLooper = - new SkBlurDrawLooper (SK_ColorBLUE, - SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(10)), + new SkBlurDrawLooper (SK_ColorBLUE, + SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(10)), SkIntToScalar(5), SkIntToScalar(10), SkBlurDrawLooper::kIgnoreTransform_BlurFlag | SkBlurDrawLooper::kOverrideColor_BlurFlag | diff --git a/gm/rects.cpp b/gm/rects.cpp index 6350ea9dd1..fb70dd76b4 100644 --- a/gm/rects.cpp +++ b/gm/rects.cpp @@ -86,8 +86,8 @@ protected: p.setColor(SK_ColorWHITE); p.setAntiAlias(true); SkBlurDrawLooper* shadowLooper = - new SkBlurDrawLooper (SK_ColorWHITE, - SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(10)), + new SkBlurDrawLooper (SK_ColorWHITE, + SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(10)), SkIntToScalar(5), SkIntToScalar(10), SkBlurDrawLooper::kIgnoreTransform_BlurFlag | SkBlurDrawLooper::kOverrideColor_BlurFlag | diff --git a/samplecode/SampleEffects.cpp b/samplecode/SampleEffects.cpp index fd1c2489da..a65b10b71f 100644 --- a/samplecode/SampleEffects.cpp +++ b/samplecode/SampleEffects.cpp @@ -31,7 +31,7 @@ static void paint_proc1(SkPaint* paint) { static void paint_proc2(SkPaint* paint) { SkScalar dir[3] = { 1, 1, 1}; paint->setMaskFilter( - SkBlurMaskFilter::CreateEmboss(SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(1)), + SkBlurMaskFilter::CreateEmboss(SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(1)), dir, SkFloatToScalar(0.1f), SkFloatToScalar(0.05f)))->unref(); diff --git a/samplecode/SampleFuzz.cpp b/samplecode/SampleFuzz.cpp index a72e4dcf37..e66f086954 100644 --- a/samplecode/SampleFuzz.cpp +++ b/samplecode/SampleFuzz.cpp @@ -60,7 +60,7 @@ static float make_number() { int sel; if (return_large == true && R(3) == 1) { - sel = R(6); + sel = R(6); } else { sel = R(4); } @@ -70,7 +70,7 @@ static float make_number() { } if (R(2) == 1) { - v = (float)R(100); + v = (float)R(100); } else { switch (sel) { @@ -84,7 +84,7 @@ static float make_number() { } - if (R(4) == 1) { + if (R(4) == 1) { v = -v; } diff --git a/samplecode/SampleTiling.cpp b/samplecode/SampleTiling.cpp index 7b6250722c..eb791c5b39 100644 --- a/samplecode/SampleTiling.cpp +++ b/samplecode/SampleTiling.cpp @@ -67,7 +67,7 @@ class TilingView : public SampleView { SkBlurDrawLooper fLooper; public: TilingView() - : fLooper(0x88000000, + : fLooper(0x88000000, SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(1)), SkIntToScalar(2), SkIntToScalar(2)) { fTextPicture = new SkPicture(); diff --git a/src/animator/SkDrawBlur.cpp b/src/animator/SkDrawBlur.cpp index 549aa0dae9..5f388c9310 100644 --- a/src/animator/SkDrawBlur.cpp +++ b/src/animator/SkDrawBlur.cpp @@ -20,7 +20,7 @@ const SkMemberInfo SkDrawBlur::fInfo[] = { DEFINE_GET_MEMBER(SkDrawBlur); -SkDrawBlur::SkDrawBlur() +SkDrawBlur::SkDrawBlur() : fSigma(-1) , fBlurStyle(SkBlurMaskFilter::kNormal_BlurStyle) { } diff --git a/src/effects/SkBitmapAlphaThresholdShader.cpp b/src/effects/SkBitmapAlphaThresholdShader.cpp index c9275883e3..0df3aec09b 100644 --- a/src/effects/SkBitmapAlphaThresholdShader.cpp +++ b/src/effects/SkBitmapAlphaThresholdShader.cpp @@ -15,22 +15,22 @@ public: BATShader(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) { // We should probably do something here. } - - + + virtual void shadeSpan(int x, int y, SkPMColor[], int count) SK_OVERRIDE {}; - + #if SK_SUPPORT_GPU virtual GrEffectRef* asNewEffect(GrContext* context, const SkPaint& paint) const SK_OVERRIDE; #endif - + SK_DEVELOPER_TO_STRING(); SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(BATShader) - + private: SkBitmap fBitmap; SkRegion fRegion; U8CPU fThreshold; - + typedef SkShader INHERITED; }; diff --git a/tests/PaintTest.cpp b/tests/PaintTest.cpp index a7bbffa01c..c8d2becba2 100644 --- a/tests/PaintTest.cpp +++ b/tests/PaintTest.cpp @@ -143,7 +143,7 @@ static void test_copy(skiatest::Reporter* reporter) { // set a few pointers SkLayerDrawLooper* looper = new SkLayerDrawLooper(); paint.setLooper(looper)->unref(); - SkMaskFilter* mask = SkBlurMaskFilter::Create(SkBlurMaskFilter::kNormal_BlurStyle, + SkMaskFilter* mask = SkBlurMaskFilter::Create(SkBlurMaskFilter::kNormal_BlurStyle, SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(1))); paint.setMaskFilter(mask)->unref();