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

Issue 1037573004: cumulative pathops patch (Closed)

Created:
5 years, 9 months ago by caryclark
Modified:
5 years, 9 months ago
Reviewers:
Stephen Chennney, reed1
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

cumulative pathops patch Replace the implicit curve intersection with a geometric curve intersection. The implicit intersection proved mathematically unstable and took a long time to zero in on an answer. Use pointers instead of indices to refer to parts of curves. Indices required awkward renumbering. Unify t and point values so that small intervals can be eliminated in one pass. Break cubics up front to eliminate loops and cusps. Make the Simplify and Op code more regular and eliminate arbitrary differences. Add a builder that takes an array of paths and operators. Delete unused code. BUG=skia:3588 R=reed@google.com Committed: https://skia.googlesource.com/skia/+/54359294a7c9dc54802d512a5d891a35c1663392

Patch Set 1 #

Total comments: 4

Patch Set 2 : fix naming issues, erroneous call to sk array size #

Patch Set 3 : fix pathopsinverse gm #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12477 lines, -14249 lines) Patch
M gm/pathopsinverse.cpp View 1 2 3 chunks +7 lines, -7 lines 0 comments Download
M gyp/core.gypi View 1 2 3 chunks +10 lines, -8 lines 0 comments Download
D gyp/pathops.gypi View 1 2 1 chunk +0 lines, -65 lines 0 comments Download
M gyp/pathops_unittest.gyp View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M gyp/pathops_unittest.gypi View 1 2 3 chunks +7 lines, -5 lines 0 comments Download
M include/pathops/SkPathOps.h View 1 2 4 chunks +36 lines, -6 lines 0 comments Download
M src/pathops/SkAddIntersections.h View 1 2 1 chunk +4 lines, -4 lines 0 comments Download
M src/pathops/SkAddIntersections.cpp View 1 2 7 chunks +69 lines, -116 lines 0 comments Download
D src/pathops/SkDCubicIntersection.cpp View 1 2 1 chunk +0 lines, -704 lines 0 comments Download
M src/pathops/SkDCubicLineIntersection.cpp View 1 2 5 chunks +56 lines, -32 lines 0 comments Download
M src/pathops/SkDCubicToQuads.cpp View 1 2 3 chunks +8 lines, -150 lines 0 comments Download
M src/pathops/SkDLineIntersection.cpp View 1 2 7 chunks +3 lines, -81 lines 0 comments Download
D src/pathops/SkDQuadImplicit.h View 1 2 1 chunk +0 lines, -39 lines 0 comments Download
D src/pathops/SkDQuadImplicit.cpp View 1 2 1 chunk +0 lines, -117 lines 0 comments Download
D src/pathops/SkDQuadIntersection.cpp View 1 2 1 chunk +0 lines, -617 lines 0 comments Download
M src/pathops/SkDQuadLineIntersection.cpp View 1 2 4 chunks +60 lines, -14 lines 0 comments Download
M src/pathops/SkIntersectionHelper.h View 1 2 5 chunks +19 lines, -72 lines 0 comments Download
M src/pathops/SkIntersections.h View 1 2 11 chunks +27 lines, -62 lines 0 comments Download
M src/pathops/SkIntersections.cpp View 1 2 6 chunks +57 lines, -53 lines 0 comments Download
M src/pathops/SkOpAngle.h View 1 2 3 chunks +77 lines, -102 lines 0 comments Download
M src/pathops/SkOpAngle.cpp View 1 2 31 chunks +395 lines, -350 lines 0 comments Download
M src/pathops/SkOpBuilder.cpp View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M src/pathops/SkOpCoincidence.h View 1 2 2 chunks +18 lines, -2 lines 0 comments Download
A src/pathops/SkOpCoincidence.cpp View 1 2 1 chunk +388 lines, -0 lines 0 comments Download
M src/pathops/SkOpContour.h View 1 2 3 chunks +238 lines, -242 lines 0 comments Download
M src/pathops/SkOpContour.cpp View 1 2 3 chunks +44 lines, -694 lines 0 comments Download
M src/pathops/SkOpEdgeBuilder.h View 1 2 3 chunks +26 lines, -13 lines 0 comments Download
M src/pathops/SkOpEdgeBuilder.cpp View 1 2 10 chunks +68 lines, -32 lines 0 comments Download
M src/pathops/SkOpSegment.h View 1 2 2 chunks +260 lines, -444 lines 0 comments Download
M src/pathops/SkOpSegment.cpp View 1 2 38 chunks +1042 lines, -3860 lines 0 comments Download
M src/pathops/SkOpSpan.h View 1 2 1 chunk +445 lines, -21 lines 0 comments Download
A + src/pathops/SkOpSpan.cpp View 1 2 13 chunks +45 lines, -192 lines 0 comments Download
M src/pathops/SkOpTAllocator.h View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M src/pathops/SkPathOpsCommon.h View 1 2 1 chunk +15 lines, -11 lines 0 comments Download
M src/pathops/SkPathOpsCommon.cpp View 1 2 17 chunks +262 lines, -324 lines 0 comments Download
M src/pathops/SkPathOpsCubic.h View 1 2 6 chunks +52 lines, -15 lines 0 comments Download
M src/pathops/SkPathOpsCubic.cpp View 1 2 8 chunks +120 lines, -71 lines 0 comments Download
D src/pathops/SkPathOpsCubicSect.h View 1 2 1 chunk +0 lines, -175 lines 0 comments Download
M src/pathops/SkPathOpsDebug.h View 1 2 5 chunks +122 lines, -102 lines 0 comments Download
M src/pathops/SkPathOpsDebug.cpp View 1 2 4 chunks +295 lines, -388 lines 0 comments Download
M src/pathops/SkPathOpsLine.h View 1 2 1 chunk +3 lines, -10 lines 0 comments Download
M src/pathops/SkPathOpsLine.cpp View 1 2 3 chunks +1 line, -21 lines 0 comments Download
M src/pathops/SkPathOpsOp.cpp View 1 2 9 chunks +85 lines, -117 lines 0 comments Download
M src/pathops/SkPathOpsPoint.h View 1 2 7 chunks +11 lines, -42 lines 0 comments Download
M src/pathops/SkPathOpsPostSect.cpp View 1 2 10 chunks +15 lines, -12 lines 0 comments Download
M src/pathops/SkPathOpsQuad.h View 1 2 2 chunks +27 lines, -8 lines 0 comments Download
M src/pathops/SkPathOpsQuad.cpp View 1 2 5 chunks +61 lines, -14 lines 0 comments Download
D src/pathops/SkPathOpsQuadSect.h View 1 2 1 chunk +0 lines, -175 lines 0 comments Download
M src/pathops/SkPathOpsRect.h View 1 2 3 chunks +11 lines, -19 lines 0 comments Download
M src/pathops/SkPathOpsRect.cpp View 1 2 3 chunks +0 lines, -19 lines 0 comments Download
M src/pathops/SkPathOpsSimplify.cpp View 1 2 6 chunks +99 lines, -62 lines 0 comments Download
M src/pathops/SkPathOpsTCubicSect.cpp View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M src/pathops/SkPathOpsTQuadSect.cpp View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M src/pathops/SkPathOpsTSect.h View 1 2 21 chunks +1242 lines, -497 lines 0 comments Download
M src/pathops/SkPathOpsTightBounds.cpp View 1 2 1 chunk +7 lines, -5 lines 0 comments Download
D src/pathops/SkPathOpsTriangle.h View 1 2 1 chunk +0 lines, -20 lines 0 comments Download
D src/pathops/SkPathOpsTriangle.cpp View 1 2 1 chunk +0 lines, -51 lines 0 comments Download
M src/pathops/SkPathOpsTypes.h View 1 2 7 chunks +121 lines, -8 lines 0 comments Download
D src/pathops/SkQuarticRoot.h View 1 2 1 chunk +0 lines, -16 lines 0 comments Download
D src/pathops/SkQuarticRoot.cpp View 1 2 1 chunk +0 lines, -168 lines 0 comments Download
M src/pathops/SkReduceOrder.h View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M src/pathops/SkReduceOrder.cpp View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M tests/PathOpsAngleIdeas.cpp View 1 2 5 chunks +27 lines, -24 lines 0 comments Download
M tests/PathOpsAngleTest.cpp View 1 2 8 chunks +96 lines, -84 lines 0 comments Download
M tests/PathOpsBattles.cpp View 1 2 22 chunks +22 lines, -27 lines 0 comments Download
M tests/PathOpsBuilderTest.cpp View 1 2 4 chunks +22 lines, -15 lines 0 comments Download
M tests/PathOpsCubicIntersectionTest.cpp View 1 2 6 chunks +90 lines, -52 lines 0 comments Download
M tests/PathOpsCubicIntersectionTestData.cpp View 1 2 3 chunks +6 lines, -6 lines 0 comments Download
M tests/PathOpsCubicLineIntersectionTest.cpp View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M tests/PathOpsCubicQuadIntersectionTest.cpp View 1 2 4 chunks +10 lines, -223 lines 0 comments Download
D tests/PathOpsCubicToQuadsTest.cpp View 1 2 1 chunk +0 lines, -198 lines 0 comments Download
M tests/PathOpsDLineTest.cpp View 1 2 1 chunk +0 lines, -4 lines 0 comments Download
M tests/PathOpsDPointTest.cpp View 1 2 1 chunk +0 lines, -1 line 0 comments Download
D tests/PathOpsDQuadTest.cpp View 1 2 1 chunk +0 lines, -63 lines 0 comments Download
M tests/PathOpsDRectTest.cpp View 1 2 3 chunks +17 lines, -47 lines 0 comments Download
D tests/PathOpsDTriangleTest.cpp View 1 2 1 chunk +0 lines, -70 lines 0 comments Download
M tests/PathOpsDebug.cpp View 1 2 9 chunks +837 lines, -535 lines 0 comments Download
M tests/PathOpsExtendedTest.h View 1 2 4 chunks +6 lines, -1 line 0 comments Download
M tests/PathOpsExtendedTest.cpp View 1 2 19 chunks +58 lines, -42 lines 0 comments Download
M tests/PathOpsFuzz763Test.cpp View 1 2 21 chunks +26 lines, -27 lines 0 comments Download
M tests/PathOpsInverseTest.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests/PathOpsLineIntersectionTest.cpp View 1 2 11 chunks +28 lines, -15 lines 0 comments Download
M tests/PathOpsOpCubicThreadedTest.cpp View 1 2 3 chunks +8 lines, -1 line 0 comments Download
M tests/PathOpsOpLoopThreadedTest.cpp View 1 2 5 chunks +37 lines, -12 lines 0 comments Download
M tests/PathOpsOpRectThreadedTest.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M tests/PathOpsOpTest.cpp View 1 2 209 chunks +557 lines, -249 lines 0 comments Download
M tests/PathOpsQuadIntersectionTest.cpp View 1 2 6 chunks +71 lines, -11 lines 0 comments Download
M tests/PathOpsQuadIntersectionTestData.cpp View 1 2 2 chunks +5 lines, -5 lines 0 comments Download
D tests/PathOpsQuadParameterizationTest.cpp View 1 2 1 chunk +0 lines, -50 lines 0 comments Download
M tests/PathOpsSimplifyFailTest.cpp View 1 2 1 chunk +1 line, -4 lines 0 comments Download
M tests/PathOpsSimplifyTest.cpp View 1 2 5 chunks +8 lines, -9 lines 0 comments Download
M tests/PathOpsSkpTest.cpp View 1 2 115 chunks +144 lines, -191 lines 0 comments Download
M tests/PathOpsTSectDebug.h View 1 2 1 chunk +126 lines, -42 lines 0 comments Download
M tests/PathOpsTestCommon.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M tests/PathOpsTestCommon.cpp View 1 2 2 chunks +120 lines, -11 lines 0 comments Download
M tests/PathOpsThreeWayTest.cpp View 1 2 1 chunk +6 lines, -4 lines 0 comments Download
M tests/PathOpsTightBoundsTest.cpp View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M tools/pathops_sorter.htm View 1 2 14 chunks +285 lines, -1106 lines 0 comments Download
M tools/pathops_visualizer.htm View 1 2 35 chunks +3880 lines, -651 lines 0 comments Download

Messages

Total messages: 15 (6 generated)
caryclark
5 years, 9 months ago (2015-03-25 15:09:46 UTC) #1
caryclark
looking for an lgtm if the spirit moves you
5 years, 9 months ago (2015-03-25 15:54:24 UTC) #2
reed1
lgtm w/ naming convention nits. https://codereview.chromium.org/1037573004/diff/1/include/pathops/SkPathOps.h File include/pathops/SkPathOps.h (right): https://codereview.chromium.org/1037573004/diff/1/include/pathops/SkPathOps.h#newcode22 include/pathops/SkPathOps.h:22: kDifference_PathOp, //!< subtract the ...
5 years, 9 months ago (2015-03-25 20:29:24 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1037573004/10001
5 years, 9 months ago (2015-03-26 12:31:08 UTC) #6
commit-bot: I haz the power
Try jobs failed on following builders: Build-Ubuntu-GCC-Arm7-Debug-Android-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Ubuntu-GCC-Arm7-Debug-Android-Trybot/builds/141)
5 years, 9 months ago (2015-03-26 12:35:55 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1037573004/20001
5 years, 9 months ago (2015-03-26 14:45:43 UTC) #11
caryclark
https://codereview.chromium.org/1037573004/diff/1/include/pathops/SkPathOps.h File include/pathops/SkPathOps.h (right): https://codereview.chromium.org/1037573004/diff/1/include/pathops/SkPathOps.h#newcode22 include/pathops/SkPathOps.h:22: kDifference_PathOp, //!< subtract the op path from the first ...
5 years, 9 months ago (2015-03-26 14:46:52 UTC) #12
commit-bot: I haz the power
Committed patchset #3 (id:20001) as https://skia.googlesource.com/skia/+/54359294a7c9dc54802d512a5d891a35c1663392
5 years, 9 months ago (2015-03-26 14:52:50 UTC) #13
Stephen Chennney
5 years, 9 months ago (2015-03-26 15:24:16 UTC) #15
Message was sent while issue was closed.
This breaks the chrome build, specifically:

../../third_party/WebKit/Source/platform/graphics/Path.cpp:494:37: error: use of
undeclared identifier 'kDifference_PathOp'; did you mean 'kDifference_SkPathOp'?
    return Op(m_path, other.m_path, kDifference_PathOp, &m_path);
                                    ^~~~~~~~~~~~~~~~~~
                                    kDifference_SkPathOp
../../third_party/skia/include/pathops/SkPathOps.h:22:5: note:
'kDifference_SkPathOp' declared here
    kDifference_SkPathOp,         //!< subtract the op path from the first path
    ^
../../third_party/WebKit/Source/platform/graphics/Path.cpp:499:37: error: use of
undeclared identifier 'kIntersect_PathOp'; did you mean 'kIntersect_SkPathOp'?
    return Op(m_path, other.m_path, kIntersect_PathOp, &m_path);
                                    ^~~~~~~~~~~~~~~~~
                                    kIntersect_SkPathOp
../../third_party/skia/include/pathops/SkPathOps.h:23:5: note:
'kIntersect_SkPathOp' declared here
    kIntersect_SkPathOp,          //!< intersect the two paths
    ^
../../third_party/WebKit/Source/platform/graphics/Path.cpp:504:37: error: use of
undeclared identifier 'kUnion_PathOp'; did you mean 'kUnion_SkPathOp'?
    return Op(m_path, other.m_path, kUnion_PathOp, &m_path);
                                    ^~~~~~~~~~~~~
                                    kUnion_SkPathOp
../../third_party/skia/include/pathops/SkPathOps.h:24:5: note: 'kUnion_SkPathOp'
declared here
    kUnion_SkPathOp,              //!< union (inclusive-or) the two paths
    ^
You'll either need to revert the renaming in SkPathOps.h or you'll need some way
to control which names are used in chrome.

Powered by Google App Engine
This is Rietveld 408576698