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/image/SkSurface_Raster.cpp b/src/image/SkSurface_Raster.cpp
index a0b1e62..c4ac959 100644
--- a/src/image/SkSurface_Raster.cpp
+++ b/src/image/SkSurface_Raster.cpp
@@ -76,7 +76,7 @@
if (size > kMaxTotalSize) {
return false;
}
-
+
return true;
}
@@ -85,7 +85,7 @@
: INHERITED(info.fWidth, info.fHeight) {
bool isOpaque;
SkBitmap::Config config = SkImageInfoToBitmapConfig(info, &isOpaque);
-
+
fBitmap.setConfig(config, info.fWidth, info.fHeight, rb);
fBitmap.setPixels(pixels);
fBitmap.setIsOpaque(isOpaque);
@@ -140,7 +140,7 @@
if (NULL == pixels) {
return NULL;
}
-
+
return SkNEW_ARGS(SkSurface_Raster, (info, cs, pixels, rowBytes));
}
@@ -148,20 +148,20 @@
if (!SkSurface_Raster::Valid(info, cs)) {
return NULL;
}
-
+
static const size_t kMaxTotalSize = SK_MaxS32;
size_t rowBytes = SkImageMinRowBytes(info);
uint64_t size64 = (uint64_t)info.fHeight * rowBytes;
if (size64 > kMaxTotalSize) {
return NULL;
}
-
+
size_t size = (size_t)size64;
void* pixels = sk_malloc_throw(size);
if (NULL == pixels) {
return NULL;
}
-
+
SkAutoTUnref<SkPixelRef> pr(SkNEW_ARGS(SkMallocPixelRef, (pixels, size, NULL, true)));
return SkNEW_ARGS(SkSurface_Raster, (info, cs, pr, rowBytes));
}