aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-09-27 07:01:29 +0000
committerGravatar skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-09-27 07:01:29 +0000
commit65caeaf32d09f5886f3c740cfef2f1c26ef9cb50 (patch)
tree283cc2895983b68958c428185b8a803eb02b25ea
parent9822565d3eedc4350f6d5f40b3e50458b15923f9 (diff)
Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@11493 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--gm/gmmain.cpp2
-rw-r--r--gm/hairlines.cpp2
-rw-r--r--include/core/SkGraphics.h2
-rw-r--r--include/core/SkPathRef.h2
-rw-r--r--include/gpu/GrTypes.h2
-rw-r--r--src/core/SkGlyphCache.cpp14
-rw-r--r--src/core/SkGlyphCache_Globals.h22
-rw-r--r--src/effects/SkTileImageFilter.cpp3
8 files changed, 24 insertions, 25 deletions
diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp
index 84d4d3ac74..e84d61ada3 100644
--- a/gm/gmmain.cpp
+++ b/gm/gmmain.cpp
@@ -2170,7 +2170,7 @@ int tool_main(int argc, char** argv) {
SkIntToScalar(25)));
gm->setStarterMatrix(perspective);
- }
+ }
SkAutoTDelete<GM> adgm(gm);
++gmIndex;
if (moduloRemainder >= 0) {
diff --git a/gm/hairlines.cpp b/gm/hairlines.cpp
index fb7258ea4a..d0f141ba91 100644
--- a/gm/hairlines.cpp
+++ b/gm/hairlines.cpp
@@ -135,7 +135,7 @@ protected:
}
{
- // Arc example to test imperfect truncation bug (crbug.com/295626)
+ // Arc example to test imperfect truncation bug (crbug.com/295626)
static const SkScalar kRad = SkIntToScalar(2000);
static const SkScalar kStartAngle = SkFloatToScalar(262.59717f);
static const SkScalar kSweepAngle = SkScalarHalf(SkFloatToScalar(17.188717f));
diff --git a/include/core/SkGraphics.h b/include/core/SkGraphics.h
index 8281b8f768..2667a388d2 100644
--- a/include/core/SkGraphics.h
+++ b/include/core/SkGraphics.h
@@ -71,7 +71,7 @@ public:
* it will automatically try to purge entries to meet the new limit.
*/
static int SetFontCacheCountLimit(int count);
-
+
/**
* For debugging purposes, this will attempt to purge the font cache. It
* does not change the limit, but will cause subsequent font measures and
diff --git a/include/core/SkPathRef.h b/include/core/SkPathRef.h
index c834486cb7..5e0e7bbfde 100644
--- a/include/core/SkPathRef.h
+++ b/include/core/SkPathRef.h
@@ -147,7 +147,7 @@ public:
Note: this bounds may be larger than the actual shape, since curves
do not extend as far as their control points.
*/
- const SkRect& getBounds() const {
+ const SkRect& getBounds() const {
if (fBoundsIsDirty) {
this->computeBounds();
}
diff --git a/include/gpu/GrTypes.h b/include/gpu/GrTypes.h
index 0585074697..80cfca32c5 100644
--- a/include/gpu/GrTypes.h
+++ b/include/gpu/GrTypes.h
@@ -238,7 +238,7 @@ enum GrMaskFormat {
kA8_GrMaskFormat, //!< 1-byte per pixel
kA565_GrMaskFormat, //!< 2-bytes per pixel
kA888_GrMaskFormat, //!< 4-bytes per pixel
-
+
kLast_GrMaskFormat = kA888_GrMaskFormat
};
static const int kMaskFormatCount = kLast_GrMaskFormat + 1;
diff --git a/src/core/SkGlyphCache.cpp b/src/core/SkGlyphCache.cpp
index 9dd235c111..faa3f89049 100644
--- a/src/core/SkGlyphCache.cpp
+++ b/src/core/SkGlyphCache.cpp
@@ -419,9 +419,9 @@ size_t SkGlyphCache_Globals::setCacheSizeLimit(size_t newLimit) {
if (newLimit < minLimit) {
newLimit = minLimit;
}
-
+
SkAutoMutexAcquire ac(fMutex);
-
+
size_t prevLimit = fCacheSizeLimit;
fCacheSizeLimit = newLimit;
this->internalPurge();
@@ -432,9 +432,9 @@ int SkGlyphCache_Globals::setCacheCountLimit(int newCount) {
if (newCount < 0) {
newCount = 0;
}
-
+
SkAutoMutexAcquire ac(fMutex);
-
+
int prevCount = fCacheCountLimit;
fCacheCountLimit = newCount;
this->internalPurge();
@@ -618,7 +618,7 @@ void SkGlyphCache_Globals::internalAttachCacheToHead(SkGlyphCache* cache) {
cache->fNext = fHead;
}
fHead = cache;
-
+
fCacheCount += 1;
fTotalMemoryUsed += cache->fMemoryUsed;
}
@@ -660,14 +660,14 @@ void SkGlyphCache::validate() const {
void SkGlyphCache_Globals::validate() const {
size_t computedBytes = 0;
int computedCount = 0;
-
+
const SkGlyphCache* head = fHead;
while (head != NULL) {
computedBytes += head->fMemoryUsed;
computedCount += 1;
head = head->fNext;
}
-
+
SkASSERT(fTotalMemoryUsed == computedBytes);
SkASSERT(fCacheCount == computedCount);
}
diff --git a/src/core/SkGlyphCache_Globals.h b/src/core/SkGlyphCache_Globals.h
index 20b0f2953f..5066582e05 100644
--- a/src/core/SkGlyphCache_Globals.h
+++ b/src/core/SkGlyphCache_Globals.h
@@ -29,17 +29,17 @@ public:
kNo_UseMutex, // thread-local cache
kYes_UseMutex // shared cache
};
-
+
SkGlyphCache_Globals(UseMutex um) {
fHead = NULL;
fTotalMemoryUsed = 0;
fCacheSizeLimit = SK_DEFAULT_FONT_CACHE_LIMIT;
fCacheCount = 0;
fCacheCountLimit = SK_DEFAULT_FONT_CACHE_COUNT_LIMIT;
-
+
fMutex = (kYes_UseMutex == um) ? SkNEW(SkMutex) : NULL;
}
-
+
~SkGlyphCache_Globals() {
SkGlyphCache* cache = fHead;
while (cache) {
@@ -47,10 +47,10 @@ public:
SkDELETE(cache);
cache = next;
}
-
+
SkDELETE(fMutex);
}
-
+
SkMutex* fMutex;
SkGlyphCache* internalGetHead() const { return fHead; }
@@ -82,7 +82,7 @@ public:
// call when a glyphcache is available for caching (i.e. not in use)
void attachCacheToHead(SkGlyphCache*);
-
+
// can only be called when the mutex is already held
void internalDetachCache(SkGlyphCache*);
void internalAttachCacheToHead(SkGlyphCache*);
@@ -91,20 +91,20 @@ public:
static SkGlyphCache_Globals* FindTLS() {
return (SkGlyphCache_Globals*)SkTLS::Find(CreateTLS);
}
-
+
static SkGlyphCache_Globals& GetTLS() {
return *(SkGlyphCache_Globals*)SkTLS::Get(CreateTLS, DeleteTLS);
}
-
+
static void DeleteTLS() { SkTLS::Delete(CreateTLS); }
-
+
private:
SkGlyphCache* fHead;
size_t fTotalMemoryUsed;
size_t fCacheSizeLimit;
int32_t fCacheCountLimit;
int32_t fCacheCount;
-
+
// Checkout budgets, modulated by the specified min-bytes-needed-to-purge,
// and attempt to purge caches to match.
// Returns number of bytes freed.
@@ -113,7 +113,7 @@ private:
static void* CreateTLS() {
return SkNEW_ARGS(SkGlyphCache_Globals, (kNo_UseMutex));
}
-
+
static void DeleteTLS(void* ptr) {
SkDELETE((SkGlyphCache_Globals*)ptr);
}
diff --git a/src/effects/SkTileImageFilter.cpp b/src/effects/SkTileImageFilter.cpp
index f2c586dca2..a7374ade0c 100644
--- a/src/effects/SkTileImageFilter.cpp
+++ b/src/effects/SkTileImageFilter.cpp
@@ -43,7 +43,7 @@ bool SkTileImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& src, const S
SkPaint paint;
paint.setXfermodeMode(SkXfermode::kSrc_Mode);
- SkAutoTUnref<SkShader> shader(SkShader::CreateBitmapShader(subset,
+ SkAutoTUnref<SkShader> shader(SkShader::CreateBitmapShader(subset,
SkShader::kRepeat_TileMode, SkShader::kRepeat_TileMode));
paint.setShader(shader);
SkRect dstRect = fDstRect;
@@ -63,4 +63,3 @@ void SkTileImageFilter::flatten(SkFlattenableWriteBuffer& buffer) const {
buffer.writeRect(fSrcRect);
buffer.writeRect(fDstRect);
}
-