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_libbmp.cpp b/src/images/SkImageDecoder_libbmp.cpp
index d3bb871..2cbdcc3 100644
--- a/src/images/SkImageDecoder_libbmp.cpp
+++ b/src/images/SkImageDecoder_libbmp.cpp
@@ -6,7 +6,7 @@
* found in the LICENSE file.
*/
-
+
#include "bmpdecoderhelper.h"
#include "SkImageDecoder.h"
#include "SkScaledBitmapSampler.h"
@@ -18,7 +18,7 @@
class SkBMPImageDecoder : public SkImageDecoder {
public:
SkBMPImageDecoder() {}
-
+
virtual Format getFormat() const {
return kBMP_Format;
}
@@ -33,10 +33,10 @@
static SkImageDecoder* sk_libbmp_dfactory(SkStream* stream) {
static const char kBmpMagic[] = { 'B', 'M' };
-
+
size_t len = stream->getLength();
char buffer[sizeof(kBmpMagic)];
-
+
if (len > sizeof(kBmpMagic) &&
stream->read(buffer, sizeof(kBmpMagic)) == sizeof(kBmpMagic) &&
!memcmp(buffer, kBmpMagic, sizeof(kBmpMagic))) {
@@ -61,7 +61,7 @@
if (fJustBounds) {
return NULL;
}
-
+
fRGB.setCount(width * height * 3); // 3 == r, g, b
return fRGB.begin();
}
@@ -81,11 +81,11 @@
size_t length = stream->getLength();
SkAutoMalloc storage(length);
-
+
if (stream->read(storage.get(), length) != length) {
return false;
}
-
+
const bool justBounds = SkImageDecoder::kDecodeBounds_Mode == mode;
SkBmpDecoderCallback callback(justBounds);
@@ -98,11 +98,11 @@
return false;
}
}
-
+
// we don't need this anymore, so free it now (before we try to allocate
// the bitmap's pixels) rather than waiting for its destructor
storage.free();
-
+
int width = callback.width();
int height = callback.height();
SkBitmap::Config config = this->getPrefConfig(k32Bit_SrcDepth, false);
@@ -124,9 +124,9 @@
if (!this->allocPixelRef(bm, NULL)) {
return false;
}
-
+
SkAutoLockPixels alp(*bm);
-
+
if (!sampler.begin(bm, SkScaledBitmapSampler::kRGB, getDitherImage())) {
return false;
}
@@ -134,7 +134,7 @@
const int srcRowBytes = width * 3;
const int dstHeight = sampler.scaledHeight();
const uint8_t* srcRow = callback.rgb();
-
+
srcRow += sampler.srcY0() * srcRowBytes;
for (int y = 0; y < dstHeight; y++) {
sampler.next(srcRow);