Sanitizing source files in Skia_Periodic_House_Keeping
authorskia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 12 Mar 2013 07:12:32 +0000 (07:12 +0000)
committerskia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 12 Mar 2013 07:12:32 +0000 (07:12 +0000)
git-svn-id: http://skia.googlecode.com/svn/trunk@8090 2bbb7eff-a529-9590-31e7-b0007b416f81

debugger/SkDebugCanvas.h
src/effects/SkBlurMask.cpp
src/effects/SkBlurMask.h
src/effects/SkBlurMaskFilter.cpp
tests/FontHostTest.cpp

index 5afc7fca2f5b5971fb685521add58728f9755ca8..a6afec38757aa5e679639715481e495bc239a193 100644 (file)
@@ -91,7 +91,7 @@ public:
         Returns the vector of draw commands
      */
     const SkTDArray<SkDrawCommand*>& getDrawCommands() const;
-    
+
     /**
         Returns the vector of draw commands. Do not use this entry
         point - it is going away!
index 3b367024fd5b9abdc6ef083c87a942584c6a794c..8a92eef0279abb53077783d88b48e804129cd0f4 100644 (file)
@@ -1189,8 +1189,8 @@ static float gaussianIntegral(float x) {
 
 static int compute_profile_size(SkScalar radius) {
     return SkScalarRoundToInt(radius * 3);
-    
-} 
+
+}
 
 /*  compute_profile allocates and fills in an array of floating
     point values between 0 and 255 for the profile signature of
@@ -1205,7 +1205,7 @@ static int compute_profile_size(SkScalar radius) {
 
 static void compute_profile(SkScalar radius, unsigned int **profile_out) {
     int size = compute_profile_size(radius);
-    
+
     int center = size >> 1;
     unsigned int *profile = SkNEW_ARRAY(unsigned int, size);
 
@@ -1242,46 +1242,46 @@ bool SkBlurMask::BlurRect(SkMask *dst, const SkRect &src,
                           SkScalar provided_radius, Style style,
                           SkIPoint *margin, SkMask::CreateMode createMode) {
     int profile_size;
-    
+
     float radius = SkScalarToFloat(SkScalarMul(provided_radius, kBlurRadiusFudgeFactor));
 
     // adjust blur radius to match interpretation from boxfilter code
     radius = (radius + .5f) * 2.f;
 
     profile_size = compute_profile_size(radius);
-    
+
     int pad = profile_size/2;
     if (margin) {
         margin->set( pad, pad );
     }
 
-    dst->fBounds.set(SkScalarRoundToInt(src.fLeft - pad), 
-                     SkScalarRoundToInt(src.fTop - pad), 
-                     SkScalarRoundToInt(src.fRight + pad), 
+    dst->fBounds.set(SkScalarRoundToInt(src.fLeft - pad),
+                     SkScalarRoundToInt(src.fTop - pad),
+                     SkScalarRoundToInt(src.fRight + pad),
                      SkScalarRoundToInt(src.fBottom + pad));
 
     dst->fRowBytes = dst->fBounds.width();
     dst->fFormat = SkMask::kA8_Format;
     dst->fImage = NULL;
-    
+
     int             sw = SkScalarFloorToInt(src.width());
     int             sh = SkScalarFloorToInt(src.height());
-    
+
     if (createMode == SkMask::kJustComputeBounds_CreateMode) {
         if (style == kInner_Style) {
-            dst->fBounds.set(SkScalarRoundToInt(src.fLeft), 
-                             SkScalarRoundToInt(src.fTop), 
-                             SkScalarRoundToInt(src.fRight), 
+            dst->fBounds.set(SkScalarRoundToInt(src.fLeft),
+                             SkScalarRoundToInt(src.fTop),
+                             SkScalarRoundToInt(src.fRight),
                              SkScalarRoundToInt(src.fBottom)); // restore trimmed bounds
             dst->fRowBytes = sw;
         }
         return true;
     }
     unsigned int *profile = NULL;
-    
+
     compute_profile(radius, &profile);
     SkAutoTDeleteArray<unsigned int> ada(profile);
-    
+
     size_t dstSize = dst->computeImageSize();
     if (0 == dstSize) {
         return false;   // too big to allocate, abort
@@ -1345,9 +1345,9 @@ bool SkBlurMask::BlurRect(SkMask *dst, const SkRect &src,
         }
         SkMask::FreeImage(dp);
 
-        dst->fBounds.set(SkScalarRoundToInt(src.fLeft), 
-                         SkScalarRoundToInt(src.fTop), 
-                         SkScalarRoundToInt(src.fRight), 
+        dst->fBounds.set(SkScalarRoundToInt(src.fLeft),
+                         SkScalarRoundToInt(src.fTop),
+                         SkScalarRoundToInt(src.fRight),
                          SkScalarRoundToInt(src.fBottom)); // restore trimmed bounds
         dst->fRowBytes = sw;
 
@@ -1360,7 +1360,7 @@ bool SkBlurMask::BlurRect(SkMask *dst, const SkRect &src,
         for (int y = pad ; y < dstHeight-pad ; y++) {
             uint8_t *dst_scanline = dp + y*dstWidth + pad;
             memset(dst_scanline, 0xff, sw);
-        }        
+        }
     }
     // normal and solid styles are the same for analytic rect blurs, so don't
     // need to handle solid specially.
index 4849ee77a9e56061dc0b549949c3baf199a07ee6..b60c2aadccbc24c132d3e88c3674a508d4617fbc 100644 (file)
@@ -31,7 +31,7 @@ public:
 
     static bool BlurRect(SkMask *dst, const SkRect &src,
                          SkScalar radius, Style style,
-                         SkIPoint *margin = NULL, 
+                         SkIPoint *margin = NULL,
                          SkMask::CreateMode createMode=SkMask::kComputeBoundsAndRenderImage_CreateMode);
     static bool Blur(SkMask* dst, const SkMask& src,
                      SkScalar radius, Style style, Quality quality,
index 8385844f82b1582d55b1a0a7705fa720797c2bcb..88043ff6feb671e4ad9765b22c8aaeebce6e9e0b 100644 (file)
@@ -23,7 +23,7 @@ public:
     virtual SkMask::Format getFormat() const SK_OVERRIDE;
     virtual bool filterMask(SkMask* dst, const SkMask& src, const SkMatrix&,
                             SkIPoint* margin) const SK_OVERRIDE;
-    
+
     virtual BlurType asABlur(BlurInfo*) const SK_OVERRIDE;
     virtual void computeFastBounds(const SkRect&, SkRect*) const SK_OVERRIDE;
 
@@ -33,8 +33,8 @@ protected:
     virtual FilterReturn filterRectsToNine(const SkRect[], int count, const SkMatrix&,
                                            const SkIRect& clipBounds,
                                            NinePatch*) const SK_OVERRIDE;
-                                           
-    bool filterRectMask(SkMask* dstM, const SkRect& r, const SkMatrix& matrix, 
+
+    bool filterRectMask(SkMask* dstM, const SkRect& r, const SkMatrix& matrix,
                         SkIPoint* margin, SkMask::CreateMode createMode) const;
 
 private:
@@ -128,7 +128,7 @@ bool SkBlurMaskFilterImpl::filterRectMask(SkMask* dst, const SkRect& r,
     // a request like 10,000)
     static const SkScalar MAX_RADIUS = SkIntToScalar(128);
     radius = SkMinScalar(radius, MAX_RADIUS);
-    
+
     return SkBlurMask::BlurRect(dst, r, radius, (SkBlurMask::Style)fBlurStyle,
                                 margin, createMode);
 }
@@ -210,17 +210,17 @@ SkBlurMaskFilterImpl::filterRectsToNine(const SkRect rects[], int count,
     srcM.fImage = NULL;
     srcM.fFormat = SkMask::kA8_Format;
     srcM.fRowBytes = 0;
-    
+
     bool filterResult = false;
     if (count == 1 && c_analyticBlurNinepatch) {
         // special case for fast rect blur
         // don't actually do the blur the first time, just compute the correct size
-        filterResult = this->filterRectMask(&dstM, rects[0], matrix, &margin, 
+        filterResult = this->filterRectMask(&dstM, rects[0], matrix, &margin,
                                             SkMask::kJustComputeBounds_CreateMode);
     } else {
         filterResult = this->filterMask(&dstM, srcM, matrix, &margin);
     }
-    
+
     if (!filterResult) {
         return kFalse_FilterReturn;
     }
@@ -290,7 +290,7 @@ SkBlurMaskFilterImpl::filterRectsToNine(const SkRect rects[], int count,
             return kFalse_FilterReturn;
         }
     } else {
-        if (!this->filterRectMask(&patch->fMask, smallR[0], matrix, &margin, 
+        if (!this->filterRectMask(&patch->fMask, smallR[0], matrix, &margin,
                                   SkMask::kComputeBoundsAndRenderImage_CreateMode)) {
             return kFalse_FilterReturn;
         }
index 87c66803f0f6dbc631742a8eca6601adb7e3ea0a..e9961551e10c4221db3e844b30434f199dbb8869 100644 (file)
@@ -47,10 +47,10 @@ static void test_fontstream(skiatest::Reporter* reporter,
                             SkStream* stream, int ttcIndex) {
     int n = SkFontStream::GetTableTags(stream, ttcIndex, NULL);
     SkAutoTArray<SkFontTableTag> array(n);
-    
+
     int n2 = SkFontStream::GetTableTags(stream, ttcIndex, array.get());
     REPORTER_ASSERT(reporter, n == n2);
-    
+
     for (int i = 0; i < n; ++i) {
 #ifdef DUMP_TTC_TABLES
         SkString str;
@@ -66,7 +66,7 @@ static void test_fontstream(skiatest::Reporter* reporter,
             if (gKnownTableSizes[j].fTag == array[i]) {
                 REPORTER_ASSERT(reporter, gKnownTableSizes[j].fSize == size);
             }
-        }        
+        }
     }
 }