Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Unified Diff: src/gpu/text/GrStencilAndCoverTextContext.cpp

Issue 1893133002: Add requireHWAA param to GrPipelineBuilder constructor (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_create_data
Patch Set: rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/gpu/GrPipelineBuilder.h ('K') | « src/gpu/text/GrStencilAndCoverTextContext.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/text/GrStencilAndCoverTextContext.cpp
diff --git a/src/gpu/text/GrStencilAndCoverTextContext.cpp b/src/gpu/text/GrStencilAndCoverTextContext.cpp
index 1355036ffe095da0d8bcc504127b1da549b0df0f..86f5888486dff2bf9760a8d74c29e0b4cb160011 100644
--- a/src/gpu/text/GrStencilAndCoverTextContext.cpp
+++ b/src/gpu/text/GrStencilAndCoverTextContext.cpp
@@ -82,7 +82,8 @@ void GrStencilAndCoverTextContext::drawText(GrContext* context, GrDrawContext* d
} else if (this->canDraw(skPaint, viewMatrix)) {
if (skPaint.getTextSize() > 0) {
TextRun run(skPaint);
- GrPipelineBuilder pipelineBuilder(paint, dc->accessRenderTarget(), clip);
+ GrPipelineBuilder pipelineBuilder(paint, dc->accessRenderTarget(), clip,
+ run.isAntiAlias());
run.setText(text, byteLength, x, y);
run.draw(context, dc, &pipelineBuilder, paint.getColor(), viewMatrix, props, 0, 0,
clipBounds, fFallbackTextContext, skPaint);
@@ -117,7 +118,8 @@ void GrStencilAndCoverTextContext::drawPosText(GrContext* context, GrDrawContext
} else if (this->canDraw(skPaint, viewMatrix)) {
if (skPaint.getTextSize() > 0) {
TextRun run(skPaint);
- GrPipelineBuilder pipelineBuilder(paint, dc->accessRenderTarget(), clip);
+ GrPipelineBuilder pipelineBuilder(paint, dc->accessRenderTarget(), clip,
+ run.isAntiAlias());
run.setPosText(text, byteLength, pos, scalarsPerPosition, offset);
run.draw(context, dc, &pipelineBuilder, paint.getColor(), viewMatrix, props, 0, 0,
clipBounds, fFallbackTextContext, skPaint);
@@ -229,6 +231,7 @@ void GrStencilAndCoverTextContext::drawTextBlob(GrContext* context, GrDrawContex
TextBlob::Iter iter(blob);
for (TextRun* run = iter.get(); run; run = iter.next()) {
+ pipelineBuilder.setState(GrPipelineBuilder::kHWAntialias_Flag, run->isAntiAlias());
run->draw(context, dc, &pipelineBuilder, paint.getColor(), viewMatrix, props, x, y,
clipBounds, fFallbackTextContext, skPaint);
run->releaseGlyphCache();
@@ -583,8 +586,6 @@ void GrStencilAndCoverTextContext::TextRun::draw(GrContext* ctx,
SkASSERT(dc->accessRenderTarget()->isStencilBufferMultisampled() || !fFont.isAntiAlias());
if (fInstanceData->count()) {
- pipelineBuilder->setState(GrPipelineBuilder::kHWAntialias_Flag, fFont.isAntiAlias());
-
GR_STATIC_CONST_SAME_STENCIL(kStencilPass,
kZero_StencilOp,
kKeep_StencilOp,
« src/gpu/GrPipelineBuilder.h ('K') | « src/gpu/text/GrStencilAndCoverTextContext.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698