aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2016-07-08 06:40:56 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-07-08 06:40:57 -0700
commit88cf17d099085b8085ab11571b5094163dbb2c84 (patch)
tree0737705697caa8998453d5519a19a6f12b888104 /src/gpu/effects
parentac41bac40f5a80d2bc5ccec584c23478a6900179 (diff)
Consolidate handling of infinitely thin primitives and aa bloat handing WRT batch bounds.
Diffstat (limited to 'src/gpu/effects')
-rw-r--r--src/gpu/effects/GrDashingEffect.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gpu/effects/GrDashingEffect.cpp b/src/gpu/effects/GrDashingEffect.cpp
index 4e82a62195..5949f1f8f2 100644
--- a/src/gpu/effects/GrDashingEffect.cpp
+++ b/src/gpu/effects/GrDashingEffect.cpp
@@ -282,13 +282,17 @@ private:
// compute bounds
SkScalar halfStrokeWidth = 0.5f * geometry.fSrcStrokeWidth;
SkScalar xBloat = SkPaint::kButt_Cap == cap ? 0 : halfStrokeWidth;
- fBounds.set(geometry.fPtsRot[0], geometry.fPtsRot[1]);
- fBounds.outset(xBloat, halfStrokeWidth);
+ SkRect bounds;
+ bounds.set(geometry.fPtsRot[0], geometry.fPtsRot[1]);
+ bounds.outset(xBloat, halfStrokeWidth);
// Note, we actually create the combined matrix here, and save the work
SkMatrix& combinedMatrix = fGeoData[0].fSrcRotInv;
combinedMatrix.postConcat(geometry.fViewMatrix);
- combinedMatrix.mapRect(&fBounds);
+
+ IsZeroArea zeroArea = geometry.fSrcStrokeWidth ? IsZeroArea::kNo : IsZeroArea::kYes;
+ HasAABloat aaBloat = (aaMode == AAMode::kNone) ? HasAABloat ::kNo : HasAABloat::kYes;
+ this->setTransformedBounds(bounds, combinedMatrix, aaBloat, zeroArea);
}
void initBatchTracker(const GrXPOverridesForBatch& overrides) override {
@@ -655,7 +659,7 @@ private:
}
fGeoData.push_back_n(that->geoData()->count(), that->geoData()->begin());
- this->joinBounds(that->bounds());
+ this->joinBounds(*that);
return true;
}