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/SkImageDecoder_wbmp.cpp b/src/images/SkImageDecoder_wbmp.cpp
index fedeedb..175a444 100644
--- a/src/images/SkImageDecoder_wbmp.cpp
+++ b/src/images/SkImageDecoder_wbmp.cpp
@@ -20,7 +20,7 @@
virtual Format getFormat() const {
return kWBMP_Format;
}
-
+
protected:
virtual bool onDecode(SkStream* stream, SkBitmap* bm, Mode);
};
@@ -40,7 +40,7 @@
}
n = (n << 7) | (data & 0x7F);
} while (data & 0x80);
-
+
*value = n;
return true;
}
@@ -48,11 +48,11 @@
struct wbmp_head {
int fWidth;
int fHeight;
-
+
bool init(SkStream* stream)
{
uint8_t data;
-
+
if (!read_byte(stream, &data) || data != 0) { // unknown type
return false;
}
@@ -68,11 +68,11 @@
return fWidth != 0 && fHeight != 0;
}
};
-
+
static void expand_bits_to_bytes(uint8_t dst[], const uint8_t src[], int bits)
{
int bytes = bits >> 3;
-
+
for (int i = 0; i < bytes; i++) {
unsigned mask = *src++;
dst[0] = (mask >> 7) & 1;
@@ -85,14 +85,14 @@
dst[7] = (mask >> 0) & 1;
dst += 8;
}
-
+
bits &= 7;
if (bits > 0) {
unsigned mask = *src;
do {
*dst++ = (mask >> 7) & 1;;
mask <<= 1;
- } while (--bits != 0);
+ } while (--bits != 0);
}
}
@@ -100,21 +100,21 @@
Mode mode)
{
wbmp_head head;
-
+
if (!head.init(stream)) {
return false;
}
-
+
int width = head.fWidth;
int height = head.fHeight;
-
+
// assign these directly, in case we return kDimensions_Result
decodedBitmap->setConfig(SkBitmap::kIndex8_Config, width, height);
decodedBitmap->setIsOpaque(true);
-
+
if (SkImageDecoder::kDecodeBounds_Mode == mode)
return true;
-
+
const SkPMColor colors[] = { SK_ColorBLACK, SK_ColorWHITE };
SkColorTable* ct = SkNEW_ARGS(SkColorTable, (colors, 2));
SkAutoUnref aur(ct);