Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(438)

Unified Diff: src/gpu/GrTextStrike.cpp

Issue 22850006: Replace uses of GrAssert by SkASSERT. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrTextContext.cpp ('k') | src/gpu/GrTextStrike_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrTextStrike.cpp
diff --git a/src/gpu/GrTextStrike.cpp b/src/gpu/GrTextStrike.cpp
index 1fe83c96d73d01cd922f0432ce9b784649d9cbb1..6533d565ef8a8cfe64de611d3ade9621c3a4cb9b 100644
--- a/src/gpu/GrTextStrike.cpp
+++ b/src/gpu/GrTextStrike.cpp
@@ -50,7 +50,7 @@ GrTextStrike* GrFontCache::generateStrike(GrFontScaler* scaler,
if (fHead) {
fHead->fPrev = strike;
} else {
- GrAssert(NULL == fTail);
+ SkASSERT(NULL == fTail);
fTail = strike;
}
strike->fPrev = NULL;
@@ -82,7 +82,7 @@ void GrFontCache::purgeExceptFor(GrTextStrike* preserveStrike) {
// keep purging if we won't free up any atlases with this strike.
purge = (NULL == strikeToPurge->fAtlas);
int index = fCache.slowFindIndex(strikeToPurge);
- GrAssert(index >= 0);
+ SkASSERT(index >= 0);
fCache.removeAt(index, strikeToPurge->fFontScalerKey->getHash());
this->detachStrikeFromList(strikeToPurge);
delete strikeToPurge;
@@ -105,7 +105,7 @@ void GrFontCache::freeAtlasExceptFor(GrTextStrike* preserveStrike) {
if (strikeToPurge->removeUnusedAtlases()) {
if (NULL == strikeToPurge->fAtlas) {
int index = fCache.slowFindIndex(strikeToPurge);
- GrAssert(index >= 0);
+ SkASSERT(index >= 0);
fCache.removeAt(index, strikeToPurge->fFontScalerKey->getHash());
this->detachStrikeFromList(strikeToPurge);
delete strikeToPurge;
@@ -119,12 +119,12 @@ void GrFontCache::freeAtlasExceptFor(GrTextStrike* preserveStrike) {
void GrFontCache::validate() const {
int count = fCache.count();
if (0 == count) {
- GrAssert(!fHead);
- GrAssert(!fTail);
+ SkASSERT(!fHead);
+ SkASSERT(!fTail);
} else if (1 == count) {
- GrAssert(fHead == fTail);
+ SkASSERT(fHead == fTail);
} else {
- GrAssert(fHead != fTail);
+ SkASSERT(fHead != fTail);
}
int count2 = 0;
@@ -133,7 +133,7 @@ void GrFontCache::validate() const {
count2 += 1;
strike = strike->fNext;
}
- GrAssert(count == count2);
+ SkASSERT(count == count2);
count2 = 0;
strike = fTail;
@@ -141,7 +141,7 @@ void GrFontCache::validate() const {
count2 += 1;
strike = strike->fPrev;
}
- GrAssert(count == count2);
+ SkASSERT(count == count2);
}
#endif
@@ -223,9 +223,9 @@ bool GrTextStrike::getGlyphAtlas(GrGlyph* glyph, GrFontScaler* scaler,
if ((++gCounter % 10) == 0) return false;
#endif
- GrAssert(glyph);
- GrAssert(scaler);
- GrAssert(fCache.contains(glyph));
+ SkASSERT(glyph);
+ SkASSERT(scaler);
+ SkASSERT(fCache.contains(glyph));
if (glyph->fAtlas) {
glyph->fAtlas->setDrawToken(currentDrawToken);
return true;
« no previous file with comments | « src/gpu/GrTextContext.cpp ('k') | src/gpu/GrTextStrike_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698