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

Unified Diff: src/gpu/GrTextStrike.cpp

Issue 24047005: Have multiple plotmgrs, one for each mask format. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 3 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/GrAtlas.cpp ('k') | no next file » | 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 d3214a7012e06b96fa85481340ab7ad3728b2653..47b6216665ae0626e08e111c985ee29930be8f0b 100644
--- a/src/gpu/GrTextStrike.cpp
+++ b/src/gpu/GrTextStrike.cpp
@@ -69,10 +69,12 @@ void GrFontCache::freeAll() {
}
void GrFontCache::purgeExceptFor(GrTextStrike* preserveStrike) {
+ SkASSERT(NULL != preserveStrike);
GrTextStrike* strike = fTail;
bool purge = true;
+ GrMaskFormat maskFormat = preserveStrike->fMaskFormat;
while (strike) {
- if (strike == preserveStrike) {
+ if (strike == preserveStrike || maskFormat != strike->fMaskFormat) {
strike = strike->fPrev;
continue;
}
@@ -94,9 +96,11 @@ void GrFontCache::purgeExceptFor(GrTextStrike* preserveStrike) {
}
void GrFontCache::freeAtlasExceptFor(GrTextStrike* preserveStrike) {
+ SkASSERT(NULL != preserveStrike);
GrTextStrike* strike = fTail;
+ GrMaskFormat maskFormat = preserveStrike->fMaskFormat;
while (strike) {
- if (strike == preserveStrike) {
+ if (strike == preserveStrike || maskFormat != strike->fMaskFormat) {
strike = strike->fPrev;
continue;
}
« no previous file with comments | « src/gpu/GrAtlas.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698