From 7d330eb19cd3c9278abce68ca0e3efabf2ec8f87 Mon Sep 17 00:00:00 2001 From: "commit-bot@chromium.org" Date: Fri, 27 Sep 2013 19:39:38 +0000 Subject: 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 --- src/gpu/GrTextContext.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/gpu/GrTextContext.cpp') 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) { -- cgit v1.2.3