Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@10385 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gm/bleed.cpp b/gm/bleed.cpp
index 24c1d46..c5e8662 100644
--- a/gm/bleed.cpp
+++ b/gm/bleed.cpp
@@ -20,7 +20,7 @@
}
#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 @@
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 @@
// 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 @@
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 @@
// 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 @@
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 @@
#if SK_SUPPORT_GPU
if (NULL != ctx) {
ctx->setMaxTextureSizeOverride(oldMaxTextureSize);
- }
+ }
#endif
}
diff --git a/gyp/pdfviewer.gyp b/gyp/pdfviewer.gyp
index 7e862b8..914b8c8 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 678133d..871d461 100644
--- a/include/core/SkImage.h
+++ b/include/core/SkImage.h
@@ -67,7 +67,7 @@
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 e955cac..ced251b 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -254,7 +254,7 @@
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 @@
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 20dc57d..8100b7a 100644
--- a/include/gpu/GrTextureAccess.h
+++ b/include/gpu/GrTextureAccess.h
@@ -25,7 +25,7 @@
GrTextureParams() {
this->reset();
}
-
+
enum FilterMode {
kNone_FilterMode,
kBilerp_FilterMode,
diff --git a/src/core/SkBitmapProcShader.cpp b/src/core/SkBitmapProcShader.cpp
index 9486d7a..0e7ac6a 100644
--- a/src/core/SkBitmapProcShader.cpp
+++ b/src/core/SkBitmapProcShader.cpp
@@ -380,7 +380,7 @@
"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 4afa98f..45c7344 100644
--- a/src/core/SkScaledImageCache.cpp
+++ b/src/core/SkScaledImageCache.cpp
@@ -324,7 +324,7 @@
#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 b4787fb..823fde8 100644
--- a/src/core/SkTDynamicHash.h
+++ b/src/core/SkTDynamicHash.h
@@ -19,7 +19,7 @@
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 @@
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 @@
} 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 @@
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 @@
}
this->checkStrink();
}
-
+
private:
int countCollisions(const Key& key) const {
const T* const deleted = this->deletedValue();
@@ -147,17 +147,17 @@
#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 @@
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 9831f1d..93c4564 100644
--- a/src/gpu/GrClipMaskManager.cpp
+++ b/src/gpu/GrClipMaskManager.cpp
@@ -358,7 +358,7 @@
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 6d90276..61de982 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -1161,9 +1161,9 @@
"MIPMaps.");
textureFilterMode = GrTextureParams::kMipMap_FilterMode;
break;
-
+
}
-
+
params.setFilterMode(textureFilterMode);
if (!this->shouldTileBitmap(bitmap, params, srcRectPtr)) {
@@ -1235,7 +1235,7 @@
}
}
-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 @@
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 74ca9f9..1331ae4 100644
--- a/src/gpu/effects/GrSingleTextureEffect.h
+++ b/src/gpu/effects/GrSingleTextureEffect.h
@@ -30,7 +30,7 @@
/** 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&,