aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/text
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-03-16 14:19:07 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-16 19:10:15 +0000
commit2bf4b3a97b770811d9e0558dbbfbdb57cfafbdb7 (patch)
tree3e73ebe67a871db43e4ba9f0a9df3edf15361bca /src/gpu/text
parent1165b1ef6f069d512c6d5a43ef431b3be6f8c80f (diff)
Remove GrPipeline from GrDrawOp.
GrDrawOp subclasses are now free to construct their pipelines at flush time and now in theory could use multiple GrPipelines for multipass rendering. GrProcessorSet may be used to retain the processors from a GrPaint with "pending execution" style refs. NVPR and Instanced rendering are updated to create their pipelines at flush time without a GrPipelineBuilder. The monolithic pipeline creation/management that was on GrDrawOp is moved to GrMeshDrawOp. However, this is temporary and will be removed in coming changes. Change-Id: I124282e3cea5d070970b5460c8a679fcaf7a8eff Reviewed-on: https://skia-review.googlesource.com/7279 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/text')
-rw-r--r--src/gpu/text/GrStencilAndCoverTextContext.cpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/gpu/text/GrStencilAndCoverTextContext.cpp b/src/gpu/text/GrStencilAndCoverTextContext.cpp
index acd426787b..e572e5d633 100644
--- a/src/gpu/text/GrStencilAndCoverTextContext.cpp
+++ b/src/gpu/text/GrStencilAndCoverTextContext.cpp
@@ -605,24 +605,13 @@ void GrStencilAndCoverTextContext::TextRun::draw(GrContext* ctx,
const SkRect bounds = SkRect::MakeIWH(renderTargetContext->width(),
renderTargetContext->height());
+ // The run's "font" overrides the anti-aliasing of the passed in SkPaint!
std::unique_ptr<GrDrawOp> op = GrDrawPathRangeOp::Make(
viewMatrix, fTextRatio, fTextInverseRatio * x, fTextInverseRatio * y,
- grPaint.getColor(), GrPathRendering::kWinding_FillType, glyphs.get(),
+ std::move(grPaint), GrPathRendering::kWinding_FillType, runAA, glyphs.get(),
fInstanceData.get(), bounds);
- // The run's "font" overrides the anti-aliasing of the passed in SkPaint!
- GrAAType aaType = GrAAType::kNone;
- if (GrAA::kYes == runAA) {
- if (renderTargetContext->isUnifiedMultisampled()) {
- aaType = GrAAType::kMSAA;
- } else if (renderTargetContext->isStencilBufferMultisampled()) {
- aaType = GrAAType::kMixedSamples;
- }
- }
- GrPipelineBuilder pipelineBuilder(std::move(grPaint), aaType);
- pipelineBuilder.setUserStencil(&kCoverPass);
-
- renderTargetContext->addDrawOp(pipelineBuilder, clip, std::move(op));
+ renderTargetContext->addDrawOp(clip, std::move(op));
}
if (fFallbackTextBlob) {