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

Unified Diff: src/gpu/GrStencilAndCoverTextContext.cpp

Issue 1471883002: Make stencil and cover path rendering have more reasonable bounds. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/batches/GrDrawPathBatch.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrStencilAndCoverTextContext.cpp
diff --git a/src/gpu/GrStencilAndCoverTextContext.cpp b/src/gpu/GrStencilAndCoverTextContext.cpp
index 2c8773860e73b781e1a8b6aa33bc4239dadad195..bab0b32ce6a88c018623de7134a7782da5af9c87 100644
--- a/src/gpu/GrStencilAndCoverTextContext.cpp
+++ b/src/gpu/GrStencilAndCoverTextContext.cpp
@@ -516,8 +516,16 @@ void GrStencilAndCoverTextContext::TextRun::draw(GrContext* ctx,
localMatrix.setTranslateX(x);
localMatrix.setTranslateY(y);
+ // Don't compute a bounding box. For dst copy texture, we'll opt instead for it to just copy
+ // 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.
+ SkRect bounds = SkRect::MakeIWH(pipelineBuilder->getRenderTarget()->width(),
+ pipelineBuilder->getRenderTarget()->height());
+
dc->drawPathsFromRange(pipelineBuilder, drawMatrix, localMatrix, color, glyphs, fDraw,
- GrPathRendering::kWinding_FillType);
+ GrPathRendering::kWinding_FillType, bounds);
}
if (fFallbackTextBlob) {
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/batches/GrDrawPathBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698