aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-07-19 07:00:57 +0000
committerGravatar skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-07-19 07:00:57 +0000
commita79919883e275e7a5e00afc50be10cc721f6ba1d (patch)
treea699825966d6c4b5da67d31cc77e6c98530d5b7e
parent7ac13b7198c981b6d69aabff662b5e264e1c56f7 (diff)
Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@10175 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--include/core/SkPaint.h2
-rw-r--r--src/core/SkMipMap.cpp31
-rw-r--r--src/core/SkMipMap.h2
-rw-r--r--src/gpu/GrResourceCache.cpp4
-rw-r--r--src/gpu/gl/GrGLCreateNullInterface.cpp6
-rw-r--r--tests/MipMapTest.cpp6
6 files changed, 25 insertions, 26 deletions
diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h
index e39f49942e..421a35b4a7 100644
--- a/include/core/SkPaint.h
+++ b/include/core/SkPaint.h
@@ -114,7 +114,7 @@ public:
kAutoHinting_Flag = 0x800, //!< mask to force Freetype's autohinter
kVerticalText_Flag = 0x1000,
kGenA8FromLCD_Flag = 0x2000, // hack for GDI -- do not use if you can help it
-
+
// DEPRECATED -- use setFilterLevel instead
kHighQualityFilterBitmap_Flag = 0x4000, // temporary flag
// DEPRECATED -- use setFilterLevel instead
diff --git a/src/core/SkMipMap.cpp b/src/core/SkMipMap.cpp
index 063695604d..c9f5145f0a 100644
--- a/src/core/SkMipMap.cpp
+++ b/src/core/SkMipMap.cpp
@@ -16,13 +16,13 @@ static void downsampleby2_proc32(SkBitmap* dst, int x, int y,
const SkPMColor* p = src.getAddr32(x, y);
const SkPMColor* baseP = p;
SkPMColor c, ag, rb;
-
+
c = *p; ag = (c >> 8) & 0xFF00FF; rb = c & 0xFF00FF;
if (x < src.width() - 1) {
p += 1;
}
c = *p; ag += (c >> 8) & 0xFF00FF; rb += c & 0xFF00FF;
-
+
p = baseP;
if (y < src.height() - 1) {
p += src.rowBytes() >> 2;
@@ -32,7 +32,7 @@ static void downsampleby2_proc32(SkBitmap* dst, int x, int y,
p += 1;
}
c = *p; ag += (c >> 8) & 0xFF00FF; rb += c & 0xFF00FF;
-
+
*dst->getAddr32(x >> 1, y >> 1) =
((rb >> 2) & 0xFF00FF) | ((ag << 6) & 0xFF00FF00);
}
@@ -54,13 +54,13 @@ static void downsampleby2_proc16(SkBitmap* dst, int x, int y,
const uint16_t* p = src.getAddr16(x, y);
const uint16_t* baseP = p;
SkPMColor c;
-
+
c = expand16(*p);
if (x < src.width() - 1) {
p += 1;
}
c += expand16(*p);
-
+
p = baseP;
if (y < src.height() - 1) {
p += src.rowBytes() >> 1;
@@ -70,7 +70,7 @@ static void downsampleby2_proc16(SkBitmap* dst, int x, int y,
p += 1;
}
c += expand16(*p);
-
+
*dst->getAddr16(x >> 1, y >> 1) = (uint16_t)pack16(c >> 2);
}
@@ -89,13 +89,13 @@ static void downsampleby2_proc4444(SkBitmap* dst, int x, int y,
const uint16_t* p = src.getAddr16(x, y);
const uint16_t* baseP = p;
uint32_t c;
-
+
c = expand4444(*p);
if (x < src.width() - 1) {
p += 1;
}
c += expand4444(*p);
-
+
p = baseP;
if (y < src.height() - 1) {
p += src.rowBytes() >> 1;
@@ -105,7 +105,7 @@ static void downsampleby2_proc4444(SkBitmap* dst, int x, int y,
p += 1;
}
c += expand4444(*p);
-
+
*dst->getAddr16(x >> 1, y >> 1) = (uint16_t)collaps4444(c >> 2);
}
@@ -145,7 +145,7 @@ SkMipMap* SkMipMap::Build(const SkBitmap& src) {
default:
return NULL; // don't build mipmaps for these configs
}
-
+
SkAutoLockPixels alp(src);
if (!src.readyToDraw()) {
return NULL;
@@ -170,7 +170,7 @@ SkMipMap* SkMipMap::Build(const SkBitmap& src) {
if (0 == countLevels) {
return NULL;
}
-
+
Level* levels = SkMipMap::AllocLevels(countLevels, size);
if (NULL == levels) {
return NULL;
@@ -182,17 +182,17 @@ SkMipMap* SkMipMap::Build(const SkBitmap& src) {
int height = src.height();
uint32_t rowBytes;
SkBitmap srcBM(src);
-
+
for (int i = 0; i < countLevels; ++i) {
width >>= 1;
height >>= 1;
rowBytes = SkToU32(SkBitmap::ComputeRowBytes(config, width));
-
+
levels[i].fPixels = addr;
levels[i].fWidth = width;
levels[i].fHeight = height;
levels[i].fRowBytes = rowBytes;
-
+
SkBitmap dstBM;
dstBM.setConfig(config, width, height, rowBytes);
dstBM.setPixels(addr);
@@ -204,7 +204,7 @@ SkMipMap* SkMipMap::Build(const SkBitmap& src) {
}
}
srcBM.unlockPixels();
-
+
srcBM = dstBM;
addr += height * rowBytes;
}
@@ -243,4 +243,3 @@ bool SkMipMap::extractLevel(SkScalar scale, Level* levelPtr) const {
}
return true;
}
-
diff --git a/src/core/SkMipMap.h b/src/core/SkMipMap.h
index 83b57c2cdb..f8753cdc1b 100644
--- a/src/core/SkMipMap.h
+++ b/src/core/SkMipMap.h
@@ -22,7 +22,7 @@ public:
uint32_t fRowBytes;
uint32_t fWidth, fHeight;
};
-
+
bool extractLevel(SkScalar scale, Level*) const;
private:
diff --git a/src/gpu/GrResourceCache.cpp b/src/gpu/GrResourceCache.cpp
index 9dab021c60..00b2d514c1 100644
--- a/src/gpu/GrResourceCache.cpp
+++ b/src/gpu/GrResourceCache.cpp
@@ -289,7 +289,7 @@ void GrResourceCache::purgeAsNeeded(int extraCount, size_t extraBytes) {
fPurging = true;
this->internalPurge(extraCount, extraBytes);
- if (((fEntryCount+extraCount) > fMaxCount ||
+ if (((fEntryCount+extraCount) > fMaxCount ||
(fEntryBytes+extraBytes) > fMaxBytes) &&
NULL != fOverbudgetCB) {
// Despite the purge we're still over budget. See if Ganesh can
@@ -324,7 +324,7 @@ void GrResourceCache::internalPurge(int extraCount, size_t extraBytes) {
while (NULL != entry) {
GrAutoResourceCacheValidate atcv(this);
- if ((fEntryCount+extraCount) <= fMaxCount &&
+ if ((fEntryCount+extraCount) <= fMaxCount &&
(fEntryBytes+extraBytes) <= fMaxBytes) {
withinBudget = true;
break;
diff --git a/src/gpu/gl/GrGLCreateNullInterface.cpp b/src/gpu/gl/GrGLCreateNullInterface.cpp
index 76307e4988..aa9b93c813 100644
--- a/src/gpu/gl/GrGLCreateNullInterface.cpp
+++ b/src/gpu/gl/GrGLCreateNullInterface.cpp
@@ -109,9 +109,9 @@ GrGLvoid GR_GL_FUNCTION_TYPE nullGLGenBuffers(GrGLsizei n, GrGLuint* ids) {
}
}
-GrGLvoid GR_GL_FUNCTION_TYPE nullGLBufferData(GrGLenum target,
- GrGLsizeiptr size,
- const GrGLvoid* data,
+GrGLvoid GR_GL_FUNCTION_TYPE nullGLBufferData(GrGLenum target,
+ GrGLsizeiptr size,
+ const GrGLvoid* data,
GrGLenum usage) {
GrGLuint id = 0;
diff --git a/tests/MipMapTest.cpp b/tests/MipMapTest.cpp
index 211d1ea367..cde0ef6aac 100644
--- a/tests/MipMapTest.cpp
+++ b/tests/MipMapTest.cpp
@@ -27,10 +27,10 @@ static void TestMipMap(skiatest::Reporter* reporter) {
for (int i = 0; i < 500; ++i) {
make_bitmap(&bm, rand);
SkAutoTUnref<SkMipMap> mm(SkMipMap::Build(bm));
-
+
REPORTER_ASSERT(reporter, !mm->extractLevel(SK_Scalar1, NULL));
REPORTER_ASSERT(reporter, !mm->extractLevel(SK_Scalar1 * 2, NULL));
-
+
SkMipMap::Level prevLevel = { 0, 0, 0, 0 };
SkScalar scale = SK_Scalar1;
@@ -43,7 +43,7 @@ static void TestMipMap(skiatest::Reporter* reporter) {
REPORTER_ASSERT(reporter, level.fWidth > 0);
REPORTER_ASSERT(reporter, level.fHeight > 0);
REPORTER_ASSERT(reporter, level.fRowBytes >= level.fWidth * 4);
-
+
if (prevLevel.fPixels) {
REPORTER_ASSERT(reporter, level.fWidth <= prevLevel.fWidth);
REPORTER_ASSERT(reporter, level.fHeight <= prevLevel.fHeight);