History log of /external/skia/gm/smallarc.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
2880df2609eba09b555ca37be04b6ad89290c765 29-Oct-2015 Tom Hudson <tomhudson@google.com> Revert "Revert "Merge remote-tracking branch 'goog/master-skia' into goog/master""

When I broke android yesterday we reverted this merge to fix the breakage.
Undoing that revert so we can pull in the fix from Skia.
/external/skia/gm/smallarc.cpp
f7834221ac5342a3446b9b299398ea3ff7976946 28-Oct-2015 Tom Hudson <tomhudson@google.com> Revert "Merge remote-tracking branch 'goog/master-skia' into goog/master"

This reverts commit 0efb99a7c27bb2c4fc1a89993da5948a4e971823.

Change-Id: I971811435410091088a932f79ddbe254fd80e79d
/external/skia/gm/smallarc.cpp
2a24338c777462e04a2b26295f9c034155ee8f3e 09-Sep-2015 halcanary <halcanary@google.com> GM: replace boilerplate with macros

I have verified locally that nothing draws differently.

Motivation:
* SK_SIMPLE_GM makes it easier to write a GM.
* Reducing 1100 lines of code makes maintenance easier.
* Simple GMs are easy to convert to Fiddles.

Review URL: https://codereview.chromium.org/1333553002
/external/skia/gm/smallarc.cpp
385fe4d4b62d7d1dd76116dd570df3290a2f487b 26-Aug-2015 halcanary <halcanary@google.com> Style Change: SkNEW->new; SkDELETE->delete
DOCS_PREVIEW= https://skia.org/?cl=1316123003

Review URL: https://codereview.chromium.org/1316123003
/external/skia/gm/smallarc.cpp
d3ebb48320cf1b7e969974673e4bd7743816985e 05-Aug-2015 bungeman <bungeman@google.com> IWYU: 'core' target, files starting A-C.

TBR=reed@google.com
Verbal lgtm, does not change API.

Committed: https://skia.googlesource.com/skia/+/7403d87db8e43d4c2b5b25ac22a0ebc22bd09d69

Review URL: https://codereview.chromium.org/1265033002
/external/skia/gm/smallarc.cpp
fb8c1fcab19c99b56d2fdcf6234751d6f0465142 05-Aug-2015 reed <reed@chromium.org> Revert of IWYU: 'core' target, files starting A-C. (patchset #5 id:80001 of https://codereview.chromium.org/1265033002/ )

Reason for revert:
revert to unblock DEPS roll

../../chrome/browser/chromeos/display/overscan_calibrator.cc:43:10: error: variable has incomplete type 'SkPath'
SkPath base_path;

Original issue's description:
> IWYU: 'core' target, files starting A-C.
>
> TBR=reed@google.com
> Verbal lgtm, does not change API.
>
> Committed: https://skia.googlesource.com/skia/+/7403d87db8e43d4c2b5b25ac22a0ebc22bd09d69

TBR=reed@google.com,mtklein@google.com,bungeman@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1273613002
/external/skia/gm/smallarc.cpp
7403d87db8e43d4c2b5b25ac22a0ebc22bd09d69 04-Aug-2015 bungeman <bungeman@google.com> IWYU: 'core' target, files starting A-C.

TBR=reed@google.com
Verbal lgtm, does not change API.

Review URL: https://codereview.chromium.org/1265033002
/external/skia/gm/smallarc.cpp
36352bf5e38f45a70ee4f4fc132a38048d38206d 26-Mar-2015 mtklein <mtklein@chromium.org> C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla}

NOPRESUBMIT=true

BUG=skia:
DOCS_PREVIEW= https://skia.org/?cl=1037793002

Review URL: https://codereview.chromium.org/1037793002
/external/skia/gm/smallarc.cpp
72c9faab45124e08c85f70ca38536914862d947c 09-Jan-2015 mtklein <mtklein@chromium.org> Fix up all the easy virtual ... SK_OVERRIDE cases.

This fixes every case where virtual and SK_OVERRIDE were on the same line,
which should be the bulk of cases. We'll have to manually clean up the rest
over time unless I level up in regexes.

for f in (find . -type f); perl -p -i -e 's/virtual (.*)SK_OVERRIDE/\1SK_OVERRIDE/g' $f; end

BUG=skia:

Review URL: https://codereview.chromium.org/806653007
/external/skia/gm/smallarc.cpp
feff7d2d7719f52c7ea52db156003e609002bf04 09-Oct-2014 caryclark <caryclark@google.com> Draw more accurate thick-stroked Beziers (disabled)

Draw thick-stroked Beziers by computing the outset quadratic, measuring the error, and subdividing until the error is within a predetermined limit.

To try this CL out, change src/core/SkStroke.h:18 to

#define QUAD_STROKE_APPROXIMATION 1

or from the command line: CPPFLAGS="-D QUAD_STROKE_APPROXIMATION=1" ./gyp_skia

Here's what's in this CL:

bench/BezierBench.cpp : a microbench for examining where the time is going
gm/beziers.cpp : random Beziers with various thicknesses
gm/smallarc.cpp : a distillation of bug skia:2769
samplecode/SampleRotateCircles.cpp : controls added for error, limit, width
src/core/SkStroke.cpp : the new stroke implementation (disabled)
tests/StrokerTest.cpp : a stroke torture test that checks normal and extreme values

The new stroke algorithm has a tweakable parameter:

stroker.setError(1); (SkStrokeRec.cpp:112)

The stroke error is the allowable gap between the midpoint of the stroke quadratic and the center Bezier. As the projection from the quadratic approaches the endpoints, the error is decreased proportionally so that it is always inside the quadratic curve.

An overview of how this works:
- For a given T range of a Bezier, compute the perpendiculars and find the points outset and inset for some radius.
- Construct tangents for the quadratic stroke.
- If the tangent don't intersect between them (may happen with cubics), subdivide.
- If the quadratic stroke end points are close (again, may happen with cubics), draw a line between them.
- Compute the quadratic formed by the intersecting tangents.
- If the midpoint of the quadratic is close to the midpoint of the Bezier perpendicular, return the quadratic.
- If the end of the stroke at the Bezier midpoint doesn't intersect the quad's bounds, subdivide.
- Find where the Bezier midpoint ray intersects the quadratic.
- If the intersection is too close to the quad's endpoints, subdivide.
- If the error is large proportional to the intersection's distance to the quad's endpoints, subdivide.

BUG=skia:723,skia:2769

Review URL: https://codereview.chromium.org/558163005
/external/skia/gm/smallarc.cpp