Sanitizing source files in Housekeeper-Nightly

git-svn-id: http://skia.googlecode.com/svn/trunk@10385 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
skia.committer@gmail.com 2013-07-26 07:00:58 +00:00
Родитель a260e2e4e7
Коммит 956b310f13
11 изменённых файлов: 36 добавлений и 36 удалений

Просмотреть файл

@ -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
}

Просмотреть файл

@ -33,7 +33,7 @@
],
'destination': '<(SHARED_INTERMEDIATE_DIR)',
},
],
],
'actions': [
{
'action_name': 'spec2def',

Просмотреть файл

@ -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
*/

Просмотреть файл

@ -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);

Просмотреть файл

@ -25,7 +25,7 @@ public:
GrTextureParams() {
this->reset();
}
enum FilterMode {
kNone_FilterMode,
kBilerp_FilterMode,

Просмотреть файл

@ -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, &params);

Просмотреть файл

@ -324,7 +324,7 @@ void SkScaledImageCache::purgeAsNeeded() {
#ifdef USE_HASH
fHash->remove(rec->fKey);
#endif
SkDELETE(rec);
fCount -= 1;
}

Просмотреть файл

@ -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.

Просмотреть файл

@ -358,7 +358,7 @@ void GrClipMaskManager::mergeMask(GrTexture* dstMask,
SkMatrix sampleM;
sampleM.setIDiv(srcMask->width(), srcMask->height());
drawState->addColorEffect(
GrTextureDomainEffect::Create(srcMask,
sampleM,

Просмотреть файл

@ -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.

Просмотреть файл

@ -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&,