From 7bd141dce43ea3405bc60c9c84e6f910b851b079 Mon Sep 17 00:00:00 2001 From: "skia.committer@gmail.com" Date: Wed, 28 Aug 2013 07:01:18 +0000 Subject: [PATCH] Sanitizing source files in Housekeeper-Nightly git-svn-id: http://skia.googlecode.com/svn/trunk@10968 2bbb7eff-a529-9590-31e7-b0007b416f81 --- gm/blurrect.cpp | 2 +- include/effects/SkBlurMaskFilter.h | 2 +- samplecode/SampleAll.cpp | 8 ++++---- samplecode/SampleXfermodesBlur.cpp | 2 +- src/animator/SkDrawEmboss.cpp | 2 +- src/effects/SkBlurDrawLooper.cpp | 2 +- src/effects/SkBlurMask.cpp | 10 +++++----- src/effects/SkBlurMask.h | 2 +- src/effects/SkBlurMaskFilter.cpp | 2 +- src/effects/SkEmbossMaskFilter.cpp | 2 +- src/ports/SkFontHost_win.cpp | 2 +- 11 files changed, 18 insertions(+), 18 deletions(-) diff --git a/gm/blurrect.cpp b/gm/blurrect.cpp index 2cb962f24..49ee33e3a 100644 --- a/gm/blurrect.cpp +++ b/gm/blurrect.cpp @@ -71,7 +71,7 @@ class BlurRectGM : public skiagm::GM { SkAlpha fAlpha; public: BlurRectGM(const char name[], PaintProc pproc, U8CPU alpha, - SkBlurMaskFilter::BlurStyle bs) + SkBlurMaskFilter::BlurStyle bs) : fMaskFilter(SkBlurMaskFilter::Create(STROKE_WIDTH/2, bs, SkBlurMaskFilter::kHighQuality_BlurFlag)) , fName(name) diff --git a/include/effects/SkBlurMaskFilter.h b/include/effects/SkBlurMaskFilter.h index 81c0ceb80..d590b275d 100644 --- a/include/effects/SkBlurMaskFilter.h +++ b/include/effects/SkBlurMaskFilter.h @@ -49,7 +49,7 @@ public: uint32_t flags = kNone_BlurFlag); /** Create an emboss maskfilter - @param blurSigma standard deviation of the Gaussian blur to apply + @param blurSigma standard deviation of the Gaussian blur to apply before applying lighting (e.g. 3) @param direction array of 3 scalars [x, y, z] specifying the direction of the light source @param ambient 0...1 amount of ambient light diff --git a/samplecode/SampleAll.cpp b/samplecode/SampleAll.cpp index de99be70c..24fbc2037 100644 --- a/samplecode/SampleAll.cpp +++ b/samplecode/SampleAll.cpp @@ -80,7 +80,7 @@ private: static void r0(SkLayerRasterizer* rast, SkPaint& p) { p.setMaskFilter(SkBlurMaskFilter::Create(SkIntToScalar(3), - SkBlurMaskFilter::kNormal_BlurStyle, + SkBlurMaskFilter::kNormal_BlurStyle, SkBlurMaskFilter::kNone_BlurFlag))->unref(); rast->addLayer(p, SkIntToScalar(3), SkIntToScalar(3)); @@ -255,9 +255,9 @@ static void apply_shader(SkPaint* paint, int index) { #if 1 SkScalar dir[] = { SK_Scalar1, SK_Scalar1, SK_Scalar1 }; - paint->setMaskFilter(SkBlurMaskFilter::CreateEmboss(dir, - SK_Scalar1/4, - SkIntToScalar(4), + paint->setMaskFilter(SkBlurMaskFilter::CreateEmboss(dir, + SK_Scalar1/4, + SkIntToScalar(4), SkIntToScalar(3)))->unref(); paint->setColor(SK_ColorBLUE); #endif diff --git a/samplecode/SampleXfermodesBlur.cpp b/samplecode/SampleXfermodesBlur.cpp index a4ca9e795..841128160 100644 --- a/samplecode/SampleXfermodesBlur.cpp +++ b/samplecode/SampleXfermodesBlur.cpp @@ -46,7 +46,7 @@ class XfermodesBlurView : public SampleView { void draw_mode(SkCanvas* canvas, SkXfermode* mode, int alpha, SkScalar x, SkScalar y) { SkPaint p; - SkMaskFilter* mf = SkBlurMaskFilter::Create(5, SkBlurMaskFilter::kNormal_BlurStyle, + SkMaskFilter* mf = SkBlurMaskFilter::Create(5, SkBlurMaskFilter::kNormal_BlurStyle, SkBlurMaskFilter::kNone_BlurFlag); p.setMaskFilter(mf)->unref(); diff --git a/src/animator/SkDrawEmboss.cpp b/src/animator/SkDrawEmboss.cpp index a0084eb2f..70a2826d3 100644 --- a/src/animator/SkDrawEmboss.cpp +++ b/src/animator/SkDrawEmboss.cpp @@ -29,6 +29,6 @@ SkDrawEmboss::SkDrawEmboss() : fSigma(-1) { SkMaskFilter* SkDrawEmboss::getMaskFilter() { if (fSigma < 0 || fDirection.count() !=3) return NULL; - return SkBlurMaskFilter::CreateEmboss(fSigma, fDirection.begin(), + return SkBlurMaskFilter::CreateEmboss(fSigma, fDirection.begin(), fAmbient, fSpecular); } diff --git a/src/effects/SkBlurDrawLooper.cpp b/src/effects/SkBlurDrawLooper.cpp index fb0153c2e..e8407f9f7 100644 --- a/src/effects/SkBlurDrawLooper.cpp +++ b/src/effects/SkBlurDrawLooper.cpp @@ -21,7 +21,7 @@ SkBlurDrawLooper::SkBlurDrawLooper(SkScalar radius, SkScalar dx, SkScalar dy, this->init(SkBlurMask::ConvertRadiusToSigma(radius), dx, dy, color, flags); } -SkBlurDrawLooper::SkBlurDrawLooper(SkColor color, SkScalar sigma, +SkBlurDrawLooper::SkBlurDrawLooper(SkColor color, SkScalar sigma, SkScalar dx, SkScalar dy, uint32_t flags) { this->init(sigma, dx, dy, color, flags); } diff --git a/src/effects/SkBlurMask.cpp b/src/effects/SkBlurMask.cpp index a8ae1d313..134fef63c 100644 --- a/src/effects/SkBlurMask.cpp +++ b/src/effects/SkBlurMask.cpp @@ -486,7 +486,7 @@ void SkMask_FreeImage(uint8_t* image) { bool SkBlurMask::Blur(SkMask* dst, const SkMask& src, SkScalar radius, Style style, Quality quality, SkIPoint* margin) { - return SkBlurMask::BoxBlur(dst, src, + return SkBlurMask::BoxBlur(dst, src, SkBlurMask::ConvertRadiusToSigma(radius), style, quality, margin); } @@ -510,8 +510,8 @@ bool SkBlurMask::BoxBlur(SkMask* dst, const SkMask& src, // 6*rad+1 while the full Gaussian width is 6*sigma. passRadius = sigma - (1/6.0f); } else { - // For the low quality path we only attempt to cover 3*sigma of the - // Gaussian blur area (1.5*sigma on each side). The single pass box + // For the low quality path we only attempt to cover 3*sigma of the + // Gaussian blur area (1.5*sigma on each side). The single pass box // blur's kernel size is 2*rad+1. passRadius = 1.5f*sigma - 0.5f; } @@ -729,11 +729,11 @@ bool SkBlurMask::BlurRect(SkMask *dst, const SkRect &src, SkScalar radius, Style style, SkIPoint *margin, SkMask::CreateMode createMode) { return SkBlurMask::BlurRect(SkBlurMask::ConvertRadiusToSigma(radius), - dst, src, + dst, src, style, margin, createMode); } -bool SkBlurMask::BlurRect(SkScalar sigma, SkMask *dst, +bool SkBlurMask::BlurRect(SkScalar sigma, SkMask *dst, const SkRect &src, Style style, SkIPoint *margin, SkMask::CreateMode createMode) { int profile_size = SkScalarCeilToInt(6*sigma); diff --git a/src/effects/SkBlurMask.h b/src/effects/SkBlurMask.h index f49cd129d..061cfdec5 100644 --- a/src/effects/SkBlurMask.h +++ b/src/effects/SkBlurMask.h @@ -48,7 +48,7 @@ public: static bool BlurRect(SkMask *dst, const SkRect &src, SkScalar radius, Style style, SkIPoint *margin = NULL, - SkMask::CreateMode createMode = + SkMask::CreateMode createMode = SkMask::kComputeBoundsAndRenderImage_CreateMode); // DEPRECATED - radius-based static bool Blur(SkMask* dst, const SkMask& src, diff --git a/src/effects/SkBlurMaskFilter.cpp b/src/effects/SkBlurMaskFilter.cpp index 88333582a..c51acce39 100644 --- a/src/effects/SkBlurMaskFilter.cpp +++ b/src/effects/SkBlurMaskFilter.cpp @@ -334,7 +334,7 @@ SkBlurMaskFilterImpl::SkBlurMaskFilterImpl(SkFlattenableReadBuffer& buffer) fSigma = buffer.readScalar(); #ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V13_AND_ALL_OTHER_INSTANCES_TOO // Fixing this must be done in two stages. When the skps are recaptured in V13, - // remove the ConvertRadiusToSigma but retain the absolute value. + // remove the ConvertRadiusToSigma but retain the absolute value. // At the same time, switch the code in flatten to write a positive value. // When the skps are captured in V14 the absolute value can be removed. if (fSigma > 0) { diff --git a/src/effects/SkEmbossMaskFilter.cpp b/src/effects/SkEmbossMaskFilter.cpp index 7abe796ec..31beb511d 100644 --- a/src/effects/SkEmbossMaskFilter.cpp +++ b/src/effects/SkEmbossMaskFilter.cpp @@ -137,7 +137,7 @@ SkEmbossMaskFilter::SkEmbossMaskFilter(SkFlattenableReadBuffer& buffer) fBlurSigma = buffer.readScalar(); #ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V13_AND_ALL_OTHER_INSTANCES_TOO // Fixing this must be done in two stages. When the skps are recaptured in V13, - // remove the ConvertRadiusToSigma but retain the absolute value. + // remove the ConvertRadiusToSigma but retain the absolute value. // At the same time, switch the code in flatten to write a positive value. // When the skps are captured in V14 the absolute value can be removed. if (fBlurSigma > 0) { diff --git a/src/ports/SkFontHost_win.cpp b/src/ports/SkFontHost_win.cpp index 56dbca6fb..7ba14aac4 100755 --- a/src/ports/SkFontHost_win.cpp +++ b/src/ports/SkFontHost_win.cpp @@ -818,7 +818,7 @@ uint16_t SkScalerContext_GDI::generateCharToGlyph(SkUnichar utf32) { // TODO(ctguil): Support characters that generate more than one glyph. if (SkUTF16_FromUnichar(utf32, (uint16_t*)utf16) == 1) { // Type1 fonts fail with uniscribe API. Use GetGlyphIndices for plane 0. - + /** Real documentation for GetGlyphIndiciesW: * * When GGI_MARK_NONEXISTING_GLYPHS is not specified and a character does not map to a