diff options
author | skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-07-26 07:00:58 +0000 |
---|---|---|
committer | skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-07-26 07:00:58 +0000 |
commit | 956b310f13c7412c035406c658ff16ca85eac656 (patch) | |
tree | 5c9e6381cab42b6fb3982aa7e96babac18e7a5d7 | |
parent | a260e2e4e7a7a5bbf45ec4dc5d3211be478ac4e2 (diff) |
Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@10385 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | gm/bleed.cpp | 22 | ||||
-rw-r--r-- | gyp/pdfviewer.gyp | 2 | ||||
-rw-r--r-- | include/core/SkImage.h | 2 | ||||
-rw-r--r-- | include/gpu/GrContext.h | 4 | ||||
-rw-r--r-- | include/gpu/GrTextureAccess.h | 2 | ||||
-rw-r--r-- | src/core/SkBitmapProcShader.cpp | 2 | ||||
-rw-r--r-- | src/core/SkScaledImageCache.cpp | 2 | ||||
-rw-r--r-- | src/core/SkTDynamicHash.h | 24 | ||||
-rw-r--r-- | src/gpu/GrClipMaskManager.cpp | 2 | ||||
-rw-r--r-- | src/gpu/SkGpuDevice.cpp | 8 | ||||
-rw-r--r-- | src/gpu/effects/GrSingleTextureEffect.h | 2 |
11 files changed, 36 insertions, 36 deletions
diff --git a/gm/bleed.cpp b/gm/bleed.cpp index 24c1d46967..c5e86624b0 100644 --- a/gm/bleed.cpp +++ b/gm/bleed.cpp @@ -20,7 +20,7 @@ void GrContext::setMaxTextureSizeOverride(int maxTextureSizeOverride) { } #endif -// Create a black&white checked texture with a 1-pixel red ring +// Create a black&white checked texture with a 1-pixel red ring // around the outside edge static void make_red_ringed_bitmap(SkBitmap* result, int width, int height) { SkASSERT(0 == width % 2 && 0 == width % 2); @@ -29,7 +29,7 @@ static void make_red_ringed_bitmap(SkBitmap* result, int width, int height) { result->allocPixels(); SkAutoLockPixels lock(*result); - SkPMColor* scanline = result->getAddr32(0, 0); + SkPMColor* scanline = result->getAddr32(0, 0); for (int x = 0; x < width; ++x) { scanline[x] = SK_ColorRED; } @@ -96,9 +96,9 @@ protected: // shrink the max texture size so all our textures can be reasonably sized oldMaxTextureSize = ctx->getMaxTextureSize(); ctx->setMaxTextureSizeOverride(kMaxTextureSize); - } + } #endif - + canvas->clear(SK_ColorGRAY); SkPaint paint; @@ -107,8 +107,8 @@ protected: paint.setFilterBitmap(true); // carve out the center of the small bitmap - SkRect src = SkRect::MakeXYWH(1, 1, - kSmallTextureSize-2, + SkRect src = SkRect::MakeXYWH(1, 1, + kSmallTextureSize-2, kSmallTextureSize-2); SkRect dst = SkRect::MakeXYWH(10, 10, 100, 100); @@ -122,8 +122,8 @@ protected: // Next test out the GPU's tiling of large textures // first draw almost the whole thing - src = SkRect::MakeXYWH(1, 1, - SkIntToScalar(fBitmapBig.width()-2), + src = SkRect::MakeXYWH(1, 1, + SkIntToScalar(fBitmapBig.width()-2), SkIntToScalar(fBitmapBig.height()-2)); dst = SkRect::MakeXYWH(10, 120, 100, 100); @@ -135,8 +135,8 @@ protected: canvas->drawBitmapRectToRect(fBitmapBig, &src, dst, &paint); // next draw ~1/4 of the bitmap - src = SkRect::MakeXYWH(1, 1, - SkIntToScalar(fBitmapBig.width()/2-1), + src = SkRect::MakeXYWH(1, 1, + SkIntToScalar(fBitmapBig.width()/2-1), SkIntToScalar(fBitmapBig.height()/2-1)); dst = SkRect::MakeXYWH(10, 230, 100, 100); @@ -150,7 +150,7 @@ protected: #if SK_SUPPORT_GPU if (NULL != ctx) { ctx->setMaxTextureSizeOverride(oldMaxTextureSize); - } + } #endif } diff --git a/gyp/pdfviewer.gyp b/gyp/pdfviewer.gyp index 7e862b8b68..914b8c8325 100644 --- a/gyp/pdfviewer.gyp +++ b/gyp/pdfviewer.gyp @@ -33,7 +33,7 @@ ], 'destination': '<(SHARED_INTERMEDIATE_DIR)', }, - ], + ], 'actions': [ { 'action_name': 'spec2def', diff --git a/include/core/SkImage.h b/include/core/SkImage.h index 678133db33..871d4612c7 100644 --- a/include/core/SkImage.h +++ b/include/core/SkImage.h @@ -67,7 +67,7 @@ public: static SkImage* NewEncodedData(SkData*); /** - * GrTexture is a more logical parameter for this factory, but its + * GrTexture is a more logical parameter for this factory, but its * interactions with scratch cache still has issues, so for now we take * SkBitmap instead. This will be changed in the future. skbug.com/1449 */ diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h index e955cac504..ced251b204 100644 --- a/include/gpu/GrContext.h +++ b/include/gpu/GrContext.h @@ -254,7 +254,7 @@ public: int getMaxTextureSize() const; /** - * Temporarily override the true max texture size. Note: an override + * Temporarily override the true max texture size. Note: an override * larger then the true max texture size will have no effect. * This entry point is mainly meant for testing texture size dependent * features and is only available if defined outside of Skia (see @@ -882,7 +882,7 @@ private: SkTDArray<CleanUpData> fCleanUpData; - int fMaxTextureSizeOverride; + int fMaxTextureSizeOverride; GrContext(); // init must be called after the constructor. bool init(GrBackend, GrBackendContext); diff --git a/include/gpu/GrTextureAccess.h b/include/gpu/GrTextureAccess.h index 20dc57de07..8100b7a2eb 100644 --- a/include/gpu/GrTextureAccess.h +++ b/include/gpu/GrTextureAccess.h @@ -25,7 +25,7 @@ public: GrTextureParams() { this->reset(); } - + enum FilterMode { kNone_FilterMode, kBilerp_FilterMode, diff --git a/src/core/SkBitmapProcShader.cpp b/src/core/SkBitmapProcShader.cpp index 9486d7a15a..0e7ac6a277 100644 --- a/src/core/SkBitmapProcShader.cpp +++ b/src/core/SkBitmapProcShader.cpp @@ -380,7 +380,7 @@ GrEffectRef* SkBitmapProcShader::asNewEffect(GrContext* context, const SkPaint& "MIPMaps."); textureFilterMode = GrTextureParams::kMipMap_FilterMode; break; - + } GrTextureParams params(tm, textureFilterMode); GrTexture* texture = GrLockAndRefCachedBitmapTexture(context, fRawBitmap, ¶ms); diff --git a/src/core/SkScaledImageCache.cpp b/src/core/SkScaledImageCache.cpp index 4afa98fc14..45c7344007 100644 --- a/src/core/SkScaledImageCache.cpp +++ b/src/core/SkScaledImageCache.cpp @@ -324,7 +324,7 @@ void SkScaledImageCache::purgeAsNeeded() { #ifdef USE_HASH fHash->remove(rec->fKey); #endif - + SkDELETE(rec); fCount -= 1; } diff --git a/src/core/SkTDynamicHash.h b/src/core/SkTDynamicHash.h index b4787fb89e..823fde8db1 100644 --- a/src/core/SkTDynamicHash.h +++ b/src/core/SkTDynamicHash.h @@ -19,7 +19,7 @@ private: int fCapacity; int fCountUsed; int fCountDeleted; - + const T* deletedValue() const { return reinterpret_cast<const T*>(-1); } uint32_t hashMask() const { return fCapacity - 1; } int hashToIndex(uint32_t hash) const { @@ -37,13 +37,13 @@ public: sk_free(fArray); } } - + T* find(const KEY& key) { const T* const deleted = this->deletedValue(); const unsigned mask = this->hashMask(); int index = this->hashToIndex(HASH_FROM_KEY(key)); int delta = 1; - + do { T* candidate = fArray[index]; if (NULL == candidate) { @@ -57,14 +57,14 @@ public: } while (delta <= fCapacity); return NULL; } - + bool add(const KEY& key, T* newElement, bool autoGrow = true) { const T* const deleted = this->deletedValue(); for (;;) { const unsigned mask = this->hashMask(); int index = this->hashToIndex(HASH_FROM_KEY(key)); int delta = 1; - + do { const T* candidate = fArray[index]; if (NULL == candidate || deleted == candidate) { @@ -88,13 +88,13 @@ public: SkASSERT(!"never get here"); return false; } - + void remove(const KEY& key) { const T* const deleted = this->deletedValue(); const unsigned mask = this->hashMask(); int index = this->hashToIndex(HASH_FROM_KEY(key)); int delta = 1; - + for (;;) { const T* candidate = fArray[index]; SkASSERT(candidate); @@ -110,7 +110,7 @@ public: } this->checkStrink(); } - + private: int countCollisions(const Key& key) const { const T* const deleted = this->deletedValue(); @@ -147,17 +147,17 @@ private: #endif int oldCapacity = fCapacity; T** oldArray = fArray; - + int newCapacity = oldCapacity << 1; T** newArray = (T**)sk_malloc_throw(sizeof(T*) * newCapacity); sk_bzero(newArray, sizeof(T*) * newCapacity); - + SkDEBUGCODE(int oldCountUsed = fCountUsed;) fArray = newArray; fCapacity = newCapacity; fCountUsed = 0; fCountDeleted = 0; - + for (int i = 0; i < oldCapacity; ++i) { T* elem = oldArray[i]; if (NULL == elem || deleted == elem) { @@ -172,7 +172,7 @@ private: sk_free(oldArray); } } - + void checkStrink() { // todo: based on density and deadspace (fCountDeleted), consider // shrinking fArray and repopulating it. diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp index 9831f1d77c..93c45641ee 100644 --- a/src/gpu/GrClipMaskManager.cpp +++ b/src/gpu/GrClipMaskManager.cpp @@ -358,7 +358,7 @@ void GrClipMaskManager::mergeMask(GrTexture* dstMask, SkMatrix sampleM; sampleM.setIDiv(srcMask->width(), srcMask->height()); - + drawState->addColorEffect( GrTextureDomainEffect::Create(srcMask, sampleM, diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp index 6d90276e89..61de9822f4 100644 --- a/src/gpu/SkGpuDevice.cpp +++ b/src/gpu/SkGpuDevice.cpp @@ -1161,9 +1161,9 @@ void SkGpuDevice::drawBitmapCommon(const SkDraw& draw, "MIPMaps."); textureFilterMode = GrTextureParams::kMipMap_FilterMode; break; - + } - + params.setFilterMode(textureFilterMode); if (!this->shouldTileBitmap(bitmap, params, srcRectPtr)) { @@ -1235,7 +1235,7 @@ void SkGpuDevice::drawTiledBitmap(const SkBitmap& bitmap, } } -static bool has_aligned_samples(const SkRect& srcRect, +static bool has_aligned_samples(const SkRect& srcRect, const SkRect& transformedRect) { // detect pixel disalignment if (SkScalarAbs(SkScalarRoundToScalar(transformedRect.left()) - @@ -1251,7 +1251,7 @@ static bool has_aligned_samples(const SkRect& srcRect, return false; } -static bool may_color_bleed(const SkRect& srcRect, +static bool may_color_bleed(const SkRect& srcRect, const SkRect& transformedRect, const SkMatrix& m) { // Only gets called if has_aligned_samples returned false. diff --git a/src/gpu/effects/GrSingleTextureEffect.h b/src/gpu/effects/GrSingleTextureEffect.h index 74ca9f94cf..1331ae4ab7 100644 --- a/src/gpu/effects/GrSingleTextureEffect.h +++ b/src/gpu/effects/GrSingleTextureEffect.h @@ -30,7 +30,7 @@ protected: /** unfiltered, clamp mode */ GrSingleTextureEffect(GrTexture*, const SkMatrix&, CoordsType = kLocal_CoordsType); /** clamp mode */ - GrSingleTextureEffect(GrTexture*, const SkMatrix&, GrTextureParams::FilterMode filterMode, + GrSingleTextureEffect(GrTexture*, const SkMatrix&, GrTextureParams::FilterMode filterMode, CoordsType = kLocal_CoordsType); GrSingleTextureEffect(GrTexture*, const SkMatrix&, |