Sanitizing source files in Housekeeper-Nightly

git-svn-id: http://skia.googlecode.com/svn/trunk@12013 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
skia.committer@gmail.com 2013-10-30 07:01:56 +00:00
parent 7101abe5b3
commit b77f0f4ae5
6 changed files with 13 additions and 15 deletions

View File

@ -66,14 +66,14 @@ public:
void setCacheEntry(GrResourceEntry* cacheEntry) { fCacheEntry = cacheEntry; }
GrResourceEntry* getCacheEntry() { return fCacheEntry; }
void incDeferredRefCount() const {
SkASSERT(fDeferredRefCount >= 0);
++fDeferredRefCount;
void incDeferredRefCount() const {
SkASSERT(fDeferredRefCount >= 0);
++fDeferredRefCount;
}
void decDeferredRefCount() const {
SkASSERT(fDeferredRefCount > 0);
--fDeferredRefCount;
void decDeferredRefCount() const {
SkASSERT(fDeferredRefCount > 0);
--fDeferredRefCount;
if (0 == fDeferredRefCount && this->needsDeferredUnref()) {
SkASSERT(this->getRefCnt() > 1);
this->unref();
@ -122,7 +122,7 @@ private:
enum Flags {
/**
* This resource wraps a GPU resource given to us by the user.
* Lifetime management is left up to the user (i.e., we will not
* Lifetime management is left up to the user (i.e., we will not
* free it).
*/
kWrapped_FlagBit = 0x1,

View File

@ -260,7 +260,7 @@ SkScaledImageCache::ID* SkScaledImageCache::findAndLock(const SkBitmap& orig,
SkScaledImageCache::ID* SkScaledImageCache::findAndLockMip(const SkBitmap& orig,
SkMipMap const ** mip) {
Rec* rec = this->findAndLock(orig.getGenerationID(), 0, 0,
Rec* rec = this->findAndLock(orig.getGenerationID(), 0, 0,
get_bounds_from_bitmap(orig));
if (rec) {
SkASSERT(rec->fMip);

View File

@ -507,8 +507,8 @@ bool apply_morphology(const SkBitmap& input,
morphType, Gr1DKernelEffect::kX_Direction);
SkIRect clearRect = SkIRect::MakeXYWH(dstRect.fLeft, dstRect.fBottom,
dstRect.width(), radius.fHeight);
context->clear(&clearRect, GrMorphologyEffect::kErode_MorphologyType == morphType ?
SK_ColorWHITE :
context->clear(&clearRect, GrMorphologyEffect::kErode_MorphologyType == morphType ?
SK_ColorWHITE :
SK_ColorTRANSPARENT);
src.reset(ast.detach());
srcRect = dstRect;

View File

@ -546,14 +546,14 @@ void GrContext::unlockScratchTexture(GrTexture* texture) {
fTextureCache->makeNonExclusive(texture->getCacheEntry());
this->purgeCache();
} else if (texture->unique() && texture->getDeferredRefCount() <= 0) {
// Only the cache now knows about this texture. Since we're never
// reusing scratch textures (in this code path) it would just be
// Only the cache now knows about this texture. Since we're never
// reusing scratch textures (in this code path) it would just be
// wasting time sitting in the cache.
fTextureCache->makeNonExclusive(texture->getCacheEntry());
fTextureCache->deleteResource(texture->getCacheEntry());
} else {
// In this case (fRefCnt > 1 || defRefCnt > 0) but we don't really
// want to readd it to the cache (since it will never be reused).
// want to readd it to the cache (since it will never be reused).
// Instead, give up the cache's ref and leave the decision up to
// addExistingTextureToCache once its ref count reaches 0. For
// this to work we need to leave it in the exclusive list.

View File

@ -309,4 +309,3 @@ bool SkLazyPixelRef::onDecodeInto(int pow2, SkBitmap* bitmap) {
*bitmap = tmp;
return true;
}

View File

@ -201,4 +201,3 @@ DEF_TEST(CachedDecodingPixelRefTest, reporter) {
SkScaledImageCache::SetByteLimit(oldByteLimit);
}
}