Sanitizing source files in Skia_Periodic_House_Keeping
authorskia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 26 Sep 2012 02:01:18 +0000 (02:01 +0000)
committerskia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 26 Sep 2012 02:01:18 +0000 (02:01 +0000)
git-svn-id: http://skia.googlecode.com/svn/trunk@5678 2bbb7eff-a529-9590-31e7-b0007b416f81

samplecode/SampleBitmapRect.cpp
src/core/SkCanvas.cpp
src/core/SkDevice.cpp
src/gpu/SkGpuDevice.cpp

index 18208fb..3f895fc 100644 (file)
@@ -180,13 +180,13 @@ class BitmapRectView2 : public SampleView {
     SkRect  fLimitR;
     SkScalar fDX;
     SkRect  fDstR[2];
-    
+
     void bounceMe() {
         SkScalar width = fSrcR.width();
         bounce(&fSrcR.fLeft, &fDX, fLimitR.fLeft, fLimitR.fRight - width);
         fSrcR.fRight = fSrcR.fLeft + width;
     }
-    
+
 public:
     BitmapRectView2() {
         make_big_bitmap(&fBitmap);
@@ -209,7 +209,7 @@ public:
         fDstR[1] = fDstR[0];
         fDstR[1].offset(0, fDstR[0].height() * 5/4);
     }
-    
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt) {
@@ -219,8 +219,8 @@ protected:
         }
         return this->INHERITED::onQuery(evt);
     }
-    
-    virtual void onDrawContent(SkCanvas* canvas) { 
+
+    virtual void onDrawContent(SkCanvas* canvas) {
         SkPaint paint;
         paint.setStyle(SkPaint::kStroke_Style);
         paint.setColor(SK_ColorYELLOW);
@@ -230,11 +230,11 @@ protected:
             canvas->drawBitmapRectToRect(fBitmap, &fSrcR, fDstR[i], &paint);
             canvas->drawRect(fDstR[i], paint);
         }
-        
+
         this->bounceMe();
         this->inval(NULL);
     }
-    
+
 private:
     typedef SkView INHERITED;
 };
index 1bb3a45..7d55c3c 100644 (file)
@@ -1597,13 +1597,13 @@ void SkCanvas::internalDrawBitmapRect(const SkBitmap& bitmap, const SkRect* src,
     if (NULL == paint) {
         paint = lazy.init();
     }
-    
+
     LOOPER_BEGIN(*paint, SkDrawFilter::kBitmap_Type)
-    
+
     while (iter.next()) {
         iter.fDevice->drawBitmapRect(iter, bitmap, src, dst, looper.paint());
     }
-    
+
     LOOPER_END
 }
 
index fb126db..a2cfe21 100644 (file)
@@ -355,11 +355,11 @@ void SkDevice::drawBitmapRect(const SkDraw& draw, const SkBitmap& bitmap,
     SkMatrix    matrix;
     SkRect      bitmapBounds, tmpSrc, tmpDst;
     SkBitmap    tmpBitmap;
-    
+
     bitmapBounds.set(0, 0,
                      SkIntToScalar(bitmap.width()),
                      SkIntToScalar(bitmap.height()));
-    
+
     // Compute matrix from the two rectangles
     if (src) {
         tmpSrc = *src;
@@ -367,10 +367,10 @@ void SkDevice::drawBitmapRect(const SkDraw& draw, const SkBitmap& bitmap,
         tmpSrc = bitmapBounds;
     }
     matrix.setRectToRect(tmpSrc, dst, SkMatrix::kFill_ScaleToFit);
-    
+
     const SkRect* dstPtr = &dst;
     const SkBitmap* bitmapPtr = &bitmap;
-    
+
     // clip the tmpSrc to the bounds of the bitmap, and recompute dstRect if
     // needed (if the src was clipped). No check needed if src==null.
     if (src) {
@@ -382,7 +382,7 @@ void SkDevice::drawBitmapRect(const SkDraw& draw, const SkBitmap& bitmap,
             matrix.mapRect(&tmpDst, tmpSrc);
             dstPtr = &tmpDst;
         }
-        
+
         // since we may need to clamp to the borders of the src rect within
         // the bitmap, we extract a subset.
         SkIRect srcIR;
@@ -391,7 +391,7 @@ void SkDevice::drawBitmapRect(const SkDraw& draw, const SkBitmap& bitmap,
             return;
         }
         bitmapPtr = &tmpBitmap;
-        
+
         // Since we did an extract, we need to adjust the matrix accordingly
         SkScalar dx = 0, dy = 0;
         if (srcIR.fLeft > 0) {
@@ -404,7 +404,7 @@ void SkDevice::drawBitmapRect(const SkDraw& draw, const SkBitmap& bitmap,
             matrix.preTranslate(dx, dy);
         }
     }
-    
+
     // construct a shader, so we can call drawRect with the dst
     SkShader* s = SkShader::CreateBitmapShader(*bitmapPtr,
                                                SkShader::kClamp_TileMode,
index 4858041..322748e 100644 (file)
@@ -1611,7 +1611,7 @@ void SkGpuDevice::drawBitmapRect(const SkDraw& draw, const SkBitmap& bitmap,
         }
         matrix.setRectToRect(tmpSrc, dst, SkMatrix::kFill_ScaleToFit);
     }
-    
+
     // ensure that src is "valid" before we pass it to our internal routines
     // and to SkDevice. i.e. sure it is contained inside the original bitmap.
     SkIRect isrcStorage;