aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTextContext.cpp
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-09-27 19:39:38 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-09-27 19:39:38 +0000
commit7d330eb19cd3c9278abce68ca0e3efabf2ec8f87 (patch)
tree7bf9cd9bfc7bea76a09f8fcd8bef5568c30a8928 /src/gpu/GrTextContext.cpp
parent3e292aa398dc40f5188bc4f0b36c8916ac552308 (diff)
GrAtlas cleanup: Split out GrPlot and GrAtlas
This breaks up GrAtlas into the head of the list (GrAtlas) and the list elements (GrPlot). It also moves all of the GrPlot management code into GrAtlasMgr. It adds a simple pool allocator for GrPlots and removes use of GrPlotMgr. R=bsalomon@google.com, robertphillips@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/24981004 git-svn-id: http://skia.googlecode.com/svn/trunk@11508 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrTextContext.cpp')
-rw-r--r--src/gpu/GrTextContext.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gpu/GrTextContext.cpp b/src/gpu/GrTextContext.cpp
index e4303c1d7c..b050305908 100644
--- a/src/gpu/GrTextContext.cpp
+++ b/src/gpu/GrTextContext.cpp
@@ -139,7 +139,7 @@ void GrTextContext::drawPackedGlyph(GrGlyph::PackedID packed,
GrFixed height = glyph->fBounds.height();
// check if we clipped out
- if (true || NULL == glyph->fAtlas) {
+ if (true || NULL == glyph->fPlot) {
int x = vx >> 16;
int y = vy >> 16;
if (fClipRect.quickReject(x, y, x + width, y + height)) {
@@ -149,13 +149,13 @@ void GrTextContext::drawPackedGlyph(GrGlyph::PackedID packed,
}
GrDrawTarget::DrawToken drawToken = fDrawTarget->getCurrentDrawToken();
- if (NULL == glyph->fAtlas) {
+ if (NULL == glyph->fPlot) {
if (fStrike->getGlyphAtlas(glyph, scaler, drawToken)) {
goto HAS_ATLAS;
}
- // try to clear out an unused atlas before we flush
- fContext->getFontCache()->freeAtlasExceptFor(fStrike);
+ // try to clear out an unused plot before we flush
+ fContext->getFontCache()->freePlotExceptFor(fStrike);
if (fStrike->getGlyphAtlas(glyph, scaler, drawToken)) {
goto HAS_ATLAS;
}
@@ -193,13 +193,13 @@ void GrTextContext::drawPackedGlyph(GrGlyph::PackedID packed,
}
HAS_ATLAS:
- SkASSERT(glyph->fAtlas);
+ SkASSERT(glyph->fPlot);
// now promote them to fixed (TODO: Rethink using fixed pt).
width = SkIntToFixed(width);
height = SkIntToFixed(height);
- GrTexture* texture = glyph->fAtlas->texture();
+ GrTexture* texture = glyph->fPlot->texture();
SkASSERT(texture);
if (fCurrTexture != texture || fCurrVertex + 4 > fMaxVertices) {