aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/batches/GrDrawPathBatch.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2015-11-23 14:25:19 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-11-23 14:25:20 -0800
commitbf074555337a57eebc282abba497f774f8b188be (patch)
tree297305a43ee097c2b000fdfcd06bb1fda31e4e8d /src/gpu/batches/GrDrawPathBatch.cpp
parent50aa15b88ab149952dbc69e849139887e8a82410 (diff)
Make stencil and cover path rendering have more reasonable bounds.
Diffstat (limited to 'src/gpu/batches/GrDrawPathBatch.cpp')
-rw-r--r--src/gpu/batches/GrDrawPathBatch.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/gpu/batches/GrDrawPathBatch.cpp b/src/gpu/batches/GrDrawPathBatch.cpp
index faf2d961fd..a829378e54 100644
--- a/src/gpu/batches/GrDrawPathBatch.cpp
+++ b/src/gpu/batches/GrDrawPathBatch.cpp
@@ -56,18 +56,15 @@ bool GrDrawPathRangeBatch::isWinding() const {
}
GrDrawPathRangeBatch::GrDrawPathRangeBatch(const SkMatrix& viewMatrix, const SkMatrix& localMatrix,
- GrColor color, GrPathRange* range, GrPathRangeDraw* draw)
+ GrColor color, GrPathRange* range, GrPathRangeDraw* draw,
+ const SkRect& bounds)
: INHERITED(ClassID(), viewMatrix, color)
, fPathRange(range)
, fLocalMatrix(localMatrix) {
SkDEBUGCODE(draw->fUsedInBatch = true;)
fDraws.addToHead(SkRef(draw));
fTotalPathCount = draw->count();
- // 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.
- fBounds.setLargest();
+ fBounds = bounds;
}
bool GrDrawPathRangeBatch::onCombineIfPossible(GrBatch* t, const GrCaps& caps) {