diff options
Diffstat (limited to 'tests/GrShapeTest.cpp')
-rw-r--r-- | tests/GrShapeTest.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/tests/GrShapeTest.cpp b/tests/GrShapeTest.cpp index e03570564a..f0173de2a4 100644 --- a/tests/GrShapeTest.cpp +++ b/tests/GrShapeTest.cpp @@ -88,17 +88,23 @@ private: SkPath postAllStyle; fBase.asPath(&preStyle); - SkStrokeRec postPathEffectStrokeRec(SkStrokeRec::kFill_InitStyle); - if (fBase.style().applyPathEffectToPath(&postPathEffect, &postPathEffectStrokeRec, - preStyle)) { + SkStrokeRec postPEStrokeRec(SkStrokeRec::kFill_InitStyle); + if (fBase.style().applyPathEffectToPath(&postPathEffect, &postPEStrokeRec, preStyle)) { + // run postPathEffect through GrShape to get any geometry reductions that would have + // occurred to fAppliedPE. + GrShape(postPathEffect, GrStyle(postPEStrokeRec, nullptr)).asPath(&postPathEffect); + SkPath testPath; fAppliedPE.asPath(&testPath); REPORTER_ASSERT(r, testPath == postPathEffect); - REPORTER_ASSERT(r, - postPathEffectStrokeRec.hasEqualEffect(fAppliedPE.style().strokeRec())); + REPORTER_ASSERT(r, postPEStrokeRec.hasEqualEffect(fAppliedPE.style().strokeRec())); } SkStrokeRec::InitStyle fillOrHairline; if (fBase.style().applyToPath(&postAllStyle, &fillOrHairline, preStyle)) { + // run postPathEffect through GrShape to get any reductions that would have occurred + // to fAppliedFull. + GrShape(postAllStyle, GrStyle(fillOrHairline)).asPath(&postAllStyle); + SkPath testPath; fAppliedFull.asPath(&testPath); REPORTER_ASSERT(r, testPath == postAllStyle); |