diff options
author | Brian Salomon <bsalomon@google.com> | 2016-12-21 11:14:46 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-12-21 16:45:40 +0000 |
commit | 09d994ecb30de2e62a31af2c16307af31fe0e0b3 (patch) | |
tree | cc6a7b93803eb79c4061f400fc71025175e07674 /src/gpu/text | |
parent | d5c5ed556c40f442eec96e071727de1cb07faf58 (diff) |
Misc batch->op cleanup Part 1 of 2
Change-Id: I80f951976558a284e55386e0a368f08bd835d8ca
Reviewed-on: https://skia-review.googlesource.com/6359
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/gpu/text')
-rw-r--r-- | src/gpu/text/GrAtlasTextBlob.cpp | 16 | ||||
-rw-r--r-- | src/gpu/text/GrAtlasTextBlob.h | 12 | ||||
-rw-r--r-- | src/gpu/text/GrAtlasTextBlob_regenInOp.cpp (renamed from src/gpu/text/GrAtlasTextBlob_regenInBatch.cpp) | 14 | ||||
-rw-r--r-- | src/gpu/text/GrAtlasTextContext.cpp | 4 | ||||
-rw-r--r-- | src/gpu/text/GrStencilAndCoverTextContext.cpp | 2 |
5 files changed, 24 insertions, 24 deletions
diff --git a/src/gpu/text/GrAtlasTextBlob.cpp b/src/gpu/text/GrAtlasTextBlob.cpp index bf42d5dcf7..9aca37a436 100644 --- a/src/gpu/text/GrAtlasTextBlob.cpp +++ b/src/gpu/text/GrAtlasTextBlob.cpp @@ -268,7 +268,7 @@ inline sk_sp<GrDrawOp> GrAtlasTextBlob::makeOp( subRunColor = color; } - sk_sp<GrAtlasTextOp> batch; + sk_sp<GrAtlasTextOp> op; if (info.drawAsDistanceFields()) { SkColor filteredColor; SkColorFilter* colorFilter = skPaint.getColorFilter(); @@ -278,13 +278,13 @@ inline sk_sp<GrDrawOp> GrAtlasTextBlob::makeOp( filteredColor = skPaint.getColor(); } bool useBGR = SkPixelGeometryIsBGR(props.pixelGeometry()); - batch = GrAtlasTextOp::MakeDistanceField(glyphCount, cache, distanceAdjustTable, - useGammaCorrectDistanceTable, filteredColor, - info.hasUseLCDText(), useBGR); + op = GrAtlasTextOp::MakeDistanceField(glyphCount, cache, distanceAdjustTable, + useGammaCorrectDistanceTable, filteredColor, + info.hasUseLCDText(), useBGR); } else { - batch = GrAtlasTextOp::MakeBitmap(format, glyphCount, cache); + op = GrAtlasTextOp::MakeBitmap(format, glyphCount, cache); } - GrAtlasTextOp::Geometry& geometry = batch->geometry(); + GrAtlasTextOp::Geometry& geometry = op->geometry(); geometry.fViewMatrix = viewMatrix; geometry.fBlob = SkRef(this); geometry.fRun = run; @@ -292,9 +292,9 @@ inline sk_sp<GrDrawOp> GrAtlasTextBlob::makeOp( geometry.fColor = subRunColor; geometry.fX = x; geometry.fY = y; - batch->init(); + op->init(); - return std::move(batch); + return std::move(op); } inline diff --git a/src/gpu/text/GrAtlasTextBlob.h b/src/gpu/text/GrAtlasTextBlob.h index 0028cc1f98..9b3f59c834 100644 --- a/src/gpu/text/GrAtlasTextBlob.h +++ b/src/gpu/text/GrAtlasTextBlob.h @@ -260,14 +260,14 @@ public: } /** - * Consecutive calls to regenInBatch often use the same SkGlyphCache. If the same instance of - * SkAutoGlyphCache is passed to multiple calls of regenInBatch then it can save the cost of + * Consecutive calls to regenInOp often use the same SkGlyphCache. If the same instance of + * SkAutoGlyphCache is passed to multiple calls of regenInOp then it can save the cost of * multiple detach/attach operations of SkGlyphCache. */ - void regenInBatch(GrDrawOp::Target* target, GrAtlasGlyphCache* fontCache, - GrBlobRegenHelper *helper, int run, int subRun, SkAutoGlyphCache*, - size_t vertexStride, const SkMatrix& viewMatrix, SkScalar x, SkScalar y, - GrColor color, void** vertices, size_t* byteCount, int* glyphCount); + void regenInOp(GrDrawOp::Target* target, GrAtlasGlyphCache* fontCache, + GrBlobRegenHelper* helper, int run, int subRun, SkAutoGlyphCache*, + size_t vertexStride, const SkMatrix& viewMatrix, SkScalar x, SkScalar y, + GrColor color, void** vertices, size_t* byteCount, int* glyphCount); const Key& key() const { return fKey; } diff --git a/src/gpu/text/GrAtlasTextBlob_regenInBatch.cpp b/src/gpu/text/GrAtlasTextBlob_regenInOp.cpp index 9a37e42bf9..3150988fdb 100644 --- a/src/gpu/text/GrAtlasTextBlob_regenInBatch.cpp +++ b/src/gpu/text/GrAtlasTextBlob_regenInOp.cpp @@ -241,13 +241,13 @@ enum RegenMask { #define REGEN_ARGS target, fontCache, helper, &run, &info, lazyCache, \ *glyphCount, vertexStride, color, transX, transY -void GrAtlasTextBlob::regenInBatch(GrDrawOp::Target* target, - GrAtlasGlyphCache* fontCache, - GrBlobRegenHelper *helper, - int runIndex, int subRunIndex, SkAutoGlyphCache* lazyCache, - size_t vertexStride, const SkMatrix& viewMatrix, - SkScalar x, SkScalar y, GrColor color, - void** vertices, size_t* byteCount, int* glyphCount) { +void GrAtlasTextBlob::regenInOp(GrDrawOp::Target* target, + GrAtlasGlyphCache* fontCache, + GrBlobRegenHelper* helper, + int runIndex, int subRunIndex, SkAutoGlyphCache* lazyCache, + size_t vertexStride, const SkMatrix& viewMatrix, + SkScalar x, SkScalar y, GrColor color, + void** vertices, size_t* byteCount, int* glyphCount) { Run& run = fRuns[runIndex]; Run::SubRunInfo& info = run.fSubRunInfo[subRunIndex]; diff --git a/src/gpu/text/GrAtlasTextContext.cpp b/src/gpu/text/GrAtlasTextContext.cpp index e1a3675d40..3c155e3290 100644 --- a/src/gpu/text/GrAtlasTextContext.cpp +++ b/src/gpu/text/GrAtlasTextContext.cpp @@ -417,8 +417,8 @@ DRAW_OP_TEST_DEFINE(TextBlobOp) { SkScalar x = SkIntToScalar(xInt); SkScalar y = SkIntToScalar(yInt); - // right now we don't handle textblobs, nor do we handle drawPosText. Since we only - // intend to test the batch with this unit test, that is okay. + // right now we don't handle textblobs, nor do we handle drawPosText. Since we only intend to + // test the text op with this unit test, that is okay. sk_sp<GrAtlasTextBlob> blob(GrAtlasTextContext::CreateDrawTextBlob( context->getTextBlobCache(), context->getAtlasGlyphCache(), *context->caps()->shaderCaps(), grPaint, skPaint, diff --git a/src/gpu/text/GrStencilAndCoverTextContext.cpp b/src/gpu/text/GrStencilAndCoverTextContext.cpp index ed77e5cb3d..e3ad1a7b3e 100644 --- a/src/gpu/text/GrStencilAndCoverTextContext.cpp +++ b/src/gpu/text/GrStencilAndCoverTextContext.cpp @@ -629,7 +629,7 @@ void GrStencilAndCoverTextContext::TextRun::draw(GrContext* ctx, // the entire dst. Realistically this is a moot point, because any context that supports // NV_path_rendering will also support NV_blend_equation_advanced. // For clipping we'll just skip any optimizations based on the bounds. This does, however, - // hurt batching. + // hurt GrOp combining. const SkRect bounds = SkRect::MakeIWH(renderTargetContext->width(), renderTargetContext->height()); |