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

Issue 12827020: Add base types for path ops (Closed)

Created:
7 years, 9 months ago by caryclark
Modified:
7 years, 8 months ago
Reviewers:
danakj, whunt, reed1
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

Add base types for path ops Paths contain lines, quads, and cubics, which are collectively curves. To work with path intersections, intermediary curves are constructed. For now, those intermediates use doubles to guarantee sufficient precision. The DVector, DPoint, DLine, DQuad, and DCubic structs encapsulate these intermediate curves. The DRect and DTriangle structs are created to describe intersectable areas of interest. The Bounds struct inherits from SkRect to create a SkScalar-based rectangle that intersects shared edges. This also includes common math equalities and debugging that the remainder of path ops builds on, as well as a temporary top-level interface in include/pathops/SkPathOps.h. Committed: https://code.google.com/p/skia/source/detail?r=8551

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 78

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2574 lines, -0 lines) Patch
A include/pathops/SkPathOps.h View 1 2 3 4 5 1 chunk +39 lines, -0 lines 0 comments Download
A src/pathops/SkPathOpsBounds.h View 1 2 3 4 1 chunk +61 lines, -0 lines 0 comments Download
A src/pathops/SkPathOpsBounds.cpp View 1 2 3 4 1 chunk +40 lines, -0 lines 0 comments Download
A src/pathops/SkPathOpsCubic.h View 1 2 3 4 1 chunk +71 lines, -0 lines 0 comments Download
A src/pathops/SkPathOpsCubic.cpp View 1 2 3 4 5 1 chunk +463 lines, -0 lines 0 comments Download
A src/pathops/SkPathOpsCurve.h View 1 2 1 chunk +152 lines, -0 lines 0 comments Download
A src/pathops/SkPathOpsDebug.h View 1 2 3 4 5 6 7 1 chunk +123 lines, -0 lines 0 comments Download
A src/pathops/SkPathOpsDebug.cpp View 1 2 3 4 5 6 7 1 chunk +59 lines, -0 lines 0 comments Download
A src/pathops/SkPathOpsLine.h View 1 2 3 4 5 6 1 chunk +35 lines, -0 lines 0 comments Download
A src/pathops/SkPathOpsLine.cpp View 1 2 3 4 5 6 1 chunk +48 lines, -0 lines 0 comments Download
A src/pathops/SkPathOpsPoint.h View 1 chunk +156 lines, -0 lines 0 comments Download
A src/pathops/SkPathOpsPoint.cpp View 1 chunk +17 lines, -0 lines 0 comments Download
A src/pathops/SkPathOpsQuad.h View 1 2 3 4 5 6 7 1 chunk +62 lines, -0 lines 0 comments Download
A src/pathops/SkPathOpsQuad.cpp View 1 2 3 4 5 6 7 1 chunk +293 lines, -0 lines 0 comments Download
A src/pathops/SkPathOpsRect.h View 1 2 1 chunk +56 lines, -0 lines 0 comments Download
A src/pathops/SkPathOpsRect.cpp View 1 2 1 chunk +65 lines, -0 lines 0 comments Download
A src/pathops/SkPathOpsTriangle.h View 1 2 1 chunk +20 lines, -0 lines 0 comments Download
A src/pathops/SkPathOpsTriangle.cpp View 1 2 1 chunk +31 lines, -0 lines 0 comments Download
A src/pathops/SkPathOpsTypes.h View 1 2 3 4 5 1 chunk +226 lines, -0 lines 0 comments Download
A src/pathops/SkPathOpsTypes.cpp View 1 2 3 4 1 chunk +69 lines, -0 lines 0 comments Download
A tests/PathOpsBoundsTest.cpp View 1 2 3 4 5 1 chunk +106 lines, -0 lines 0 comments Download
A tests/PathOpsDCubicTest.cpp View 1 2 3 4 5 1 chunk +30 lines, -0 lines 0 comments Download
A tests/PathOpsDLineTest.cpp View 1 2 3 4 5 1 chunk +54 lines, -0 lines 0 comments Download
A tests/PathOpsDPointTest.cpp View 1 2 3 4 5 1 chunk +50 lines, -0 lines 0 comments Download
A tests/PathOpsDQuadTest.cpp View 1 2 3 4 5 1 chunk +53 lines, -0 lines 0 comments Download
A tests/PathOpsDRectTest.cpp View 1 2 3 4 5 1 chunk +98 lines, -0 lines 0 comments Download
A tests/PathOpsDTriangleTest.cpp View 1 2 3 4 5 1 chunk +47 lines, -0 lines 0 comments Download
A tests/PathOpsDVectorTest.cpp View 1 2 3 4 5 1 chunk +50 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
caryclark
First cut at base types for path ops. If this is too onerous, I can ...
7 years, 9 months ago (2013-03-22 15:44:25 UTC) #1
reed1
If you have any headers that are destined for the public, lets add those to ...
7 years, 9 months ago (2013-03-22 15:58:04 UTC) #2
whunt
https://codereview.chromium.org/12827020/diff/14006/src/pathops/SkPathOpsBounds.h File src/pathops/SkPathOpsBounds.h (right): https://codereview.chromium.org/12827020/diff/14006/src/pathops/SkPathOpsBounds.h#newcode20 src/pathops/SkPathOpsBounds.h:20: void add(SkScalar left, SkScalar top, SkScalar right, SkScalar bottom) ...
7 years, 9 months ago (2013-03-22 18:16:06 UTC) #3
reed1
https://codereview.chromium.org/12827020/diff/14006/src/pathops/SkPathOpsCubic.h File src/pathops/SkPathOpsCubic.h (right): https://codereview.chromium.org/12827020/diff/14006/src/pathops/SkPathOpsCubic.h#newcode32 src/pathops/SkPathOpsCubic.h:32: const SkDPoint& operator[](int n) const { return fPts[n]; } ...
7 years, 9 months ago (2013-03-22 19:00:37 UTC) #4
danakj
https://codereview.chromium.org/12827020/diff/14006/src/pathops/SkPathOpsBounds.cpp File src/pathops/SkPathOpsBounds.cpp (right): https://codereview.chromium.org/12827020/diff/14006/src/pathops/SkPathOpsBounds.cpp#newcode2 src/pathops/SkPathOpsBounds.cpp:2: * Copyright 2012 Google Inc. 2013 everywhere https://codereview.chromium.org/12827020/diff/14006/src/pathops/SkPathOpsBounds.h File ...
7 years, 9 months ago (2013-03-22 19:11:42 UTC) #5
whunt
https://codereview.chromium.org/12827020/diff/14006/src/pathops/SkPathOpsBounds.h File src/pathops/SkPathOpsBounds.h (right): https://codereview.chromium.org/12827020/diff/14006/src/pathops/SkPathOpsBounds.h#newcode46 src/pathops/SkPathOpsBounds.h:46: bool isEmpty() { On 2013/03/22 19:11:42, danakj wrote: > ...
7 years, 9 months ago (2013-03-22 19:37:28 UTC) #6
caryclark
https://codereview.chromium.org/12827020/diff/14006/src/pathops/SkPathOpsBounds.h File src/pathops/SkPathOpsBounds.h (right): https://codereview.chromium.org/12827020/diff/14006/src/pathops/SkPathOpsBounds.h#newcode20 src/pathops/SkPathOpsBounds.h:20: void add(SkScalar left, SkScalar top, SkScalar right, SkScalar bottom) ...
7 years, 9 months ago (2013-03-22 19:38:51 UTC) #7
whunt
https://codereview.chromium.org/12827020/diff/14006/src/pathops/SkPathOpsPoint.h File src/pathops/SkPathOpsPoint.h (right): https://codereview.chromium.org/12827020/diff/14006/src/pathops/SkPathOpsPoint.h#newcode79 src/pathops/SkPathOpsPoint.h:79: void operator=(const SkPoint& pt) { On 2013/03/22 19:38:51, caryclark ...
7 years, 9 months ago (2013-03-22 19:50:09 UTC) #8
whunt
In general, what's the rational for not using constructors for these types in Skia? I'm ...
7 years, 9 months ago (2013-03-22 19:52:03 UTC) #9
danakj
https://codereview.chromium.org/12827020/diff/14006/src/pathops/SkPathOpsBounds.h File src/pathops/SkPathOpsBounds.h (right): https://codereview.chromium.org/12827020/diff/14006/src/pathops/SkPathOpsBounds.h#newcode20 src/pathops/SkPathOpsBounds.h:20: void add(SkScalar left, SkScalar top, SkScalar right, SkScalar bottom) ...
7 years, 9 months ago (2013-03-22 19:52:18 UTC) #10
caryclark
Thanks for your review contents. I apologize if some of my replies are cryptic, but ...
7 years, 9 months ago (2013-03-22 20:05:00 UTC) #11
caryclark
I looked at the code generated by auto initialization, and determined that it is efficient. ...
7 years, 9 months ago (2013-03-25 13:44:59 UTC) #12
caryclark
7 years, 8 months ago (2013-04-08 11:49:40 UTC) #13
Message was sent while issue was closed.
Committed manually as r8551 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698