diff options
author | 2016-07-08 06:40:56 -0700 | |
---|---|---|
committer | 2016-07-08 06:40:57 -0700 | |
commit | 88cf17d099085b8085ab11571b5094163dbb2c84 (patch) | |
tree | 0737705697caa8998453d5519a19a6f12b888104 /src/gpu/effects | |
parent | ac41bac40f5a80d2bc5ccec584c23478a6900179 (diff) |
Consolidate handling of infinitely thin primitives and aa bloat handing WRT batch bounds.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2127673002
Review-Url: https://codereview.chromium.org/2127673002
Diffstat (limited to 'src/gpu/effects')
-rw-r--r-- | src/gpu/effects/GrDashingEffect.cpp | 12 |
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; } |