Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/)
This CL is part I of IV (I broke down the 1280 files into 4 CLs).
Review URL: https://codereview.appspot.com/6485054
git-svn-id: http://skia.googlecode.com/svn/trunk@5262 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/core/SkBlitMask_D32.cpp b/src/core/SkBlitMask_D32.cpp
index 6576acb..4fb974b 100644
--- a/src/core/SkBlitMask_D32.cpp
+++ b/src/core/SkBlitMask_D32.cpp
@@ -69,7 +69,7 @@
if (proc) {
return proc;
}
-
+
if (isOpaque) {
return SkBlitLCD16OpaqueRow;
} else {
@@ -80,11 +80,11 @@
static void D32_LCD16_Proc(void* SK_RESTRICT dst, size_t dstRB,
const void* SK_RESTRICT mask, size_t maskRB,
SkColor color, int width, int height) {
-
- SkPMColor* dstRow = (SkPMColor*)dst;
+
+ SkPMColor* dstRow = (SkPMColor*)dst;
const uint16_t* srcRow = (const uint16_t*)mask;
SkPMColor opaqueDst;
-
+
SkBlitMask::BlitLCD16RowProc proc = NULL;
bool isOpaque = (0xFF == SkColorGetA(color));
proc = SkBlitMask::BlitLCD16RowFactory(isOpaque);
@@ -95,7 +95,7 @@
} else {
opaqueDst = 0; // ignored
}
-
+
do {
proc(dstRow, srcRow, color, width, opaqueDst);
dstRow = (SkPMColor*)((char*)dstRow + dstRB);
@@ -111,28 +111,28 @@
int srcR = SkColorGetR(color);
int srcG = SkColorGetG(color);
int srcB = SkColorGetB(color);
-
+
for (int i = 0; i < width; i++) {
SkPMColor mask = src[i];
if (0 == mask) {
continue;
}
-
+
SkPMColor d = dst[i];
-
+
int maskR = SkGetPackedR32(mask);
int maskG = SkGetPackedG32(mask);
int maskB = SkGetPackedB32(mask);
-
+
// Now upscale them to 0..256, so we can use SkAlphaBlend
maskR = SkAlpha255To256(maskR);
maskG = SkAlpha255To256(maskG);
maskB = SkAlpha255To256(maskB);
-
+
int dstR = SkGetPackedR32(d);
int dstG = SkGetPackedG32(d);
int dstB = SkGetPackedB32(d);
-
+
// LCD blitting is only supported if the dst is known/required
// to be opaque
dst[i] = SkPackARGB32(0xFF,
@@ -149,34 +149,34 @@
int srcR = SkColorGetR(color);
int srcG = SkColorGetG(color);
int srcB = SkColorGetB(color);
-
+
srcA = SkAlpha255To256(srcA);
-
+
for (int i = 0; i < width; i++) {
SkPMColor mask = src[i];
if (0 == mask) {
continue;
}
-
+
SkPMColor d = dst[i];
-
+
int maskR = SkGetPackedR32(mask);
int maskG = SkGetPackedG32(mask);
int maskB = SkGetPackedB32(mask);
-
+
// Now upscale them to 0..256, so we can use SkAlphaBlend
maskR = SkAlpha255To256(maskR);
maskG = SkAlpha255To256(maskG);
maskB = SkAlpha255To256(maskB);
-
+
maskR = maskR * srcA >> 8;
maskG = maskG * srcA >> 8;
maskB = maskB * srcA >> 8;
-
+
int dstR = SkGetPackedR32(d);
int dstG = SkGetPackedG32(d);
int dstB = SkGetPackedB32(d);
-
+
// LCD blitting is only supported if the dst is known/required
// to be opaque
dst[i] = SkPackARGB32(0xFF,
@@ -192,7 +192,7 @@
SkASSERT(height > 0);
SkPMColor* SK_RESTRICT dstRow = (SkPMColor*)dst;
const SkPMColor* SK_RESTRICT srcRow = (const SkPMColor*)mask;
-
+
do {
blit_lcd32_row(dstRow, srcRow, color, width);
dstRow = (SkPMColor*)((char*)dstRow + dstRB);
@@ -206,7 +206,7 @@
SkASSERT(height > 0);
SkPMColor* SK_RESTRICT dstRow = (SkPMColor*)dst;
const SkPMColor* SK_RESTRICT srcRow = (const SkPMColor*)mask;
-
+
do {
blit_lcd32_opaque_row(dstRow, srcRow, color, width);
dstRow = (SkPMColor*)((char*)dstRow + dstRB);
@@ -388,7 +388,7 @@
}
static int src_alpha_blend(int src, int dst, int srcA, int mask) {
-
+
return dst + mul(src - mul(srcA, dst), mask);
}
@@ -400,7 +400,7 @@
if (0 == m) {
continue;
}
-
+
SkPMColor s = src[i];
SkPMColor d = dst[i];
@@ -417,15 +417,15 @@
int maskR = SkGetPackedR16(m) >> (SK_R16_BITS - 5);
int maskG = SkGetPackedG16(m) >> (SK_G16_BITS - 5);
int maskB = SkGetPackedB16(m) >> (SK_B16_BITS - 5);
-
+
maskR = upscale31To255(maskR);
maskG = upscale31To255(maskG);
maskB = upscale31To255(maskB);
-
+
int dstR = SkGetPackedR32(d);
int dstG = SkGetPackedG32(d);
int dstB = SkGetPackedB32(d);
-
+
// LCD blitting is only supported if the dst is known/required
// to be opaque
dst[i] = SkPackARGB32(0xFF,
@@ -443,10 +443,10 @@
if (0 == m) {
continue;
}
-
+
SkPMColor s = src[i];
SkPMColor d = dst[i];
-
+
int srcR = SkGetPackedR32(s);
int srcG = SkGetPackedG32(s);
int srcB = SkGetPackedB32(s);
@@ -457,16 +457,16 @@
int maskR = SkGetPackedR16(m) >> (SK_R16_BITS - 5);
int maskG = SkGetPackedG16(m) >> (SK_G16_BITS - 5);
int maskB = SkGetPackedB16(m) >> (SK_B16_BITS - 5);
-
+
// Now upscale them to 0..32, so we can use blend32
maskR = SkUpscale31To32(maskR);
maskG = SkUpscale31To32(maskG);
maskB = SkUpscale31To32(maskB);
-
+
int dstR = SkGetPackedR32(d);
int dstG = SkGetPackedG32(d);
int dstB = SkGetPackedB32(d);
-
+
// LCD blitting is only supported if the dst is known/required
// to be opaque
dst[i] = SkPackARGB32(0xFF,
@@ -490,11 +490,11 @@
int srcR = SkGetPackedR32(s);
int srcG = SkGetPackedG32(s);
int srcB = SkGetPackedB32(s);
-
+
srcA = SkAlpha255To256(srcA);
-
+
SkPMColor d = dst[i];
-
+
int maskR = SkGetPackedR32(m);
int maskG = SkGetPackedG32(m);
int maskB = SkGetPackedB32(m);
@@ -507,7 +507,7 @@
int dstR = SkGetPackedR32(d);
int dstG = SkGetPackedG32(d);
int dstB = SkGetPackedB32(d);
-
+
// LCD blitting is only supported if the dst is known/required
// to be opaque
dst[i] = SkPackARGB32(0xFF,
@@ -525,7 +525,7 @@
if (0 == m) {
continue;
}
-
+
SkPMColor s = src[i];
SkPMColor d = dst[i];
@@ -540,7 +540,7 @@
int dstR = SkGetPackedR32(d);
int dstG = SkGetPackedG32(d);
int dstB = SkGetPackedB32(d);
-
+
// Now upscale them to 0..256, so we can use SkAlphaBlend
maskR = SkAlpha255To256(maskR);
maskG = SkAlpha255To256(maskG);