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

Side by Side Diff: src/gpu/GrTextStrike_impl.h

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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/gpu/GrTextStrike.cpp ('k') | src/gpu/GrTexture.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 10
(...skipping 14 matching lines...) Expand all
25 static bool EQ(const GrTextStrike& strike, const Key& key) { 25 static bool EQ(const GrTextStrike& strike, const Key& key) {
26 return *strike.getFontScalerKey() == *key.fFontScalerKey; 26 return *strike.getFontScalerKey() == *key.fFontScalerKey;
27 } 27 }
28 28
29 private: 29 private:
30 const GrKey* fFontScalerKey; 30 const GrKey* fFontScalerKey;
31 }; 31 };
32 32
33 void GrFontCache::detachStrikeFromList(GrTextStrike* strike) { 33 void GrFontCache::detachStrikeFromList(GrTextStrike* strike) {
34 if (strike->fPrev) { 34 if (strike->fPrev) {
35 GrAssert(fHead != strike); 35 SkASSERT(fHead != strike);
36 strike->fPrev->fNext = strike->fNext; 36 strike->fPrev->fNext = strike->fNext;
37 } else { 37 } else {
38 GrAssert(fHead == strike); 38 SkASSERT(fHead == strike);
39 fHead = strike->fNext; 39 fHead = strike->fNext;
40 } 40 }
41 41
42 if (strike->fNext) { 42 if (strike->fNext) {
43 GrAssert(fTail != strike); 43 SkASSERT(fTail != strike);
44 strike->fNext->fPrev = strike->fPrev; 44 strike->fNext->fPrev = strike->fPrev;
45 } else { 45 } else {
46 GrAssert(fTail == strike); 46 SkASSERT(fTail == strike);
47 fTail = strike->fPrev; 47 fTail = strike->fPrev;
48 } 48 }
49 } 49 }
50 50
51 GrTextStrike* GrFontCache::getStrike(GrFontScaler* scaler) { 51 GrTextStrike* GrFontCache::getStrike(GrFontScaler* scaler) {
52 this->validate(); 52 this->validate();
53 53
54 Key key(scaler); 54 Key key(scaler);
55 GrTextStrike* strike = fCache.find(key); 55 GrTextStrike* strike = fCache.find(key);
56 if (NULL == strike) { 56 if (NULL == strike) {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 GrGlyph* GrTextStrike::getGlyph(GrGlyph::PackedID packed, 96 GrGlyph* GrTextStrike::getGlyph(GrGlyph::PackedID packed,
97 GrFontScaler* scaler) { 97 GrFontScaler* scaler) {
98 GrGlyph* glyph = fCache.find(packed); 98 GrGlyph* glyph = fCache.find(packed);
99 if (NULL == glyph) { 99 if (NULL == glyph) {
100 glyph = this->generateGlyph(packed, scaler); 100 glyph = this->generateGlyph(packed, scaler);
101 } 101 }
102 return glyph; 102 return glyph;
103 } 103 }
104 104
105 #endif 105 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrTextStrike.cpp ('k') | src/gpu/GrTexture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698