diff options
author | bsalomon <bsalomon@google.com> | 2016-04-01 06:06:20 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-01 06:06:20 -0700 |
commit | 342bfc25de5b0452b1551bf9db4bf45eac7718b2 (patch) | |
tree | 5d54f2ecb1ec17f7848500df30c4f6d40c5b9ae8 /src/gpu/text | |
parent | 38d68bc31d69ea9793d925dd3c7d4337330b2b7b (diff) |
Simplify GrDrawBatch uploads and token uage.
GrVertexBatch subclasses no longer need "initDraw".
Simplifies GrTestBatch
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1835283002
Review URL: https://codereview.chromium.org/1835283002
Diffstat (limited to 'src/gpu/text')
-rw-r--r-- | src/gpu/text/GrAtlasTextBlob_regenInBatch.cpp | 4 | ||||
-rw-r--r-- | src/gpu/text/GrBatchFontCache.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/gpu/text/GrAtlasTextBlob_regenInBatch.cpp b/src/gpu/text/GrAtlasTextBlob_regenInBatch.cpp index c2f3f22d7e..7283e6d516 100644 --- a/src/gpu/text/GrAtlasTextBlob_regenInBatch.cpp +++ b/src/gpu/text/GrAtlasTextBlob_regenInBatch.cpp @@ -206,7 +206,7 @@ void GrAtlasTextBlob::regenInBatch(GrDrawBatch::Target* target, SkASSERT(success); } fontCache->addGlyphToBulkAndSetUseToken(info->bulkUseToken(), glyph, - target->currentToken()); + target->nextDrawToken()); log2Width = fontCache->log2Width(info->maskFormat()); log2Height = fontCache->log2Height(info->maskFormat()); } @@ -311,7 +311,7 @@ void GrAtlasTextBlob::regenInBatch(GrDrawBatch::Target* target, // set use tokens for all of the glyphs in our subrun. This is only valid if we // have a valid atlas generation - fontCache->setUseTokenBulk(*info.bulkUseToken(), target->currentToken(), + fontCache->setUseTokenBulk(*info.bulkUseToken(), target->nextDrawToken(), info.maskFormat()); break; } diff --git a/src/gpu/text/GrBatchFontCache.h b/src/gpu/text/GrBatchFontCache.h index 7ff1b9e77f..8e420cd146 100644 --- a/src/gpu/text/GrBatchFontCache.h +++ b/src/gpu/text/GrBatchFontCache.h @@ -143,14 +143,14 @@ public: // For convenience, this function will also set the use token for the current glyph if required // NOTE: the bulk uploader is only valid if the subrun has a valid atlasGeneration void addGlyphToBulkAndSetUseToken(GrBatchAtlas::BulkUseTokenUpdater* updater, - GrGlyph* glyph, GrBatchToken token) { + GrGlyph* glyph, GrBatchDrawToken token) { SkASSERT(glyph); updater->add(glyph->fID); this->getAtlas(glyph->fMaskFormat)->setLastUseToken(glyph->fID, token); } void setUseTokenBulk(const GrBatchAtlas::BulkUseTokenUpdater& updater, - GrBatchToken token, + GrBatchDrawToken token, GrMaskFormat format) { this->getAtlas(format)->setLastUseTokenBulk(updater, token); } |