Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/)
This CL is part II of IV (I broke down the 1280 files into 4 CLs).
Review URL: https://codereview.appspot.com/6474054
git-svn-id: http://skia.googlecode.com/svn/trunk@5263 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/images/SkScaledBitmapSampler.cpp b/src/images/SkScaledBitmapSampler.cpp
index 15633d3..25b32fd 100644
--- a/src/images/SkScaledBitmapSampler.cpp
+++ b/src/images/SkScaledBitmapSampler.cpp
@@ -302,7 +302,7 @@
if (width <= 0 || height <= 0) {
sk_throw();
}
-
+
if (sampleSize <= 1) {
fScaledWidth = width;
fScaledHeight = height;
@@ -310,25 +310,25 @@
fDX = fDY = 1;
return;
}
-
+
int dx = SkMin32(sampleSize, width);
int dy = SkMin32(sampleSize, height);
-
+
fScaledWidth = width / dx;
fScaledHeight = height / dy;
-
+
SkASSERT(fScaledWidth > 0);
SkASSERT(fScaledHeight > 0);
-
+
fX0 = dx >> 1;
fY0 = dy >> 1;
-
+
SkASSERT(fX0 >= 0 && fX0 < width);
SkASSERT(fY0 >= 0 && fY0 < height);
-
+
fDX = dx;
fDY = dy;
-
+
SkASSERT(fDX > 0 && (fX0 + fDX * (fScaledWidth - 1)) < width);
SkASSERT(fDY > 0 && (fY0 + fDY * (fScaledHeight - 1)) < height);
}
@@ -413,7 +413,7 @@
default:
return false;
}
-
+
fRowProc = gProcs[index];
fDstRow = (char*)dst->getPixels();
fDstRowBytes = dst->rowBytes();