Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@5678 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/samplecode/SampleBitmapRect.cpp b/samplecode/SampleBitmapRect.cpp
index 18208fb..3f895fc 100644
--- a/samplecode/SampleBitmapRect.cpp
+++ b/samplecode/SampleBitmapRect.cpp
@@ -180,13 +180,13 @@
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 @@
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 @@
}
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 @@
canvas->drawBitmapRectToRect(fBitmap, &fSrcR, fDstR[i], &paint);
canvas->drawRect(fDstR[i], paint);
}
-
+
this->bounceMe();
this->inval(NULL);
}
-
+
private:
typedef SkView INHERITED;
};
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index 1bb3a45..7d55c3c 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -1597,13 +1597,13 @@
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
}
diff --git a/src/core/SkDevice.cpp b/src/core/SkDevice.cpp
index fb126db..a2cfe21 100644
--- a/src/core/SkDevice.cpp
+++ b/src/core/SkDevice.cpp
@@ -355,11 +355,11 @@
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 @@
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 @@
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 @@
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 @@
matrix.preTranslate(dx, dy);
}
}
-
+
// construct a shader, so we can call drawRect with the dst
SkShader* s = SkShader::CreateBitmapShader(*bitmapPtr,
SkShader::kClamp_TileMode,
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 4858041..322748e 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -1611,7 +1611,7 @@
}
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;