History log of /external/skia/gm/beziers.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
18fa6421e9cb7ac2ea6b1a97112a115d6643c0fc 27-Oct-2016 Hal Canary <halcanary@google.com> chmod -x *.cpp *.h

Change-Id: I5b37499505e26e0837921292c1aea0056e4d5ecd
Reviewed-on: https://skia-review.googlesource.com/4035
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
/external/skia/gm/beziers.cpp
477ba0c18a21e24646702c5eda6d966c75969183 26-Sep-2016 mtklein <mtklein@chromium.org> beziers: I missed an unsequenced moveTo() pair.

TBR=brianosman@google.com
BUG=skia:
NOTREECHECKS=true
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2369933002

Review-Url: https://codereview.chromium.org/2369933002
/external/skia/gm/beziers.cpp
1c127cc3e1d8603bf970211f1d85a1ce3b6fb138 26-Sep-2016 mtklein <mtklein@chromium.org> These calls to SkRandom are not sequenced.

This is why we see two versions of this GM: some compilers evaluate the
rand.nextRangeScalar() calls left to right, others right to left.

Remember this bug?
BUG=skia:3241
(https://codereview.chromium.org/1157943006 fixed hittestpath last year.)

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2368263002

Review-Url: https://codereview.chromium.org/2368263002
/external/skia/gm/beziers.cpp
dbfd7ab10883f173f5c1b653a233e18dc6142002 01-Sep-2016 mtklein <mtklein@chromium.org> Replace a lot of 'static const' with 'constexpr' or 'const'.

'static const' means, there must be at most one of these, and initialize it at
compile time if possible or runtime if necessary. This leads to unexpected
code execution, and TSAN* will complain about races on the guard variables.

Generally 'constexpr' or 'const' are better choices. Neither can cause races:
they're either intialized at compile time (constexpr) or intialized each time
independently (const).

This CL prefers constexpr where possible, and uses const where not. It even
prefers constexpr over const where they don't make a difference... I want to have
lots of examples of constexpr for people to see and mimic.

The scoped-to-class static has nothing to do with any of this, and is not changed.

* Not yet on the bots, which use an older TSAN.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2300623005

Review-Url: https://codereview.chromium.org/2300623005
/external/skia/gm/beziers.cpp
96f16e835e32665ea5af605e52715dbf43367291 10-Dec-2015 scroggo <scroggo@google.com> Use DEF_GM everywhere

BUG=skia:1902

Review URL: https://codereview.chromium.org/1518893002
/external/skia/gm/beziers.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/beziers.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/beziers.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/beziers.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/beziers.cpp
1c4029296f518a84ef90095243ba210163a1e1f9 23-Jan-2015 mtklein <mtklein@chromium.org> remove unused GM flags

Depends on https://codereview.chromium.org/873753002/

Thumbs up to CLion for refactoring this for me.

BUG=skia:

Review URL: https://codereview.chromium.org/867963004
/external/skia/gm/beziers.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/beziers.cpp
aa458fb20a4350da581f8ceec69ea16eec295ced 06-Jan-2015 tfarina <tfarina@chromium.org> Cleanup: More override fixes - another round.

BUG=skia:3075
TEST=ninja -C out/Debug
TBR=reed@google.com

Review URL: https://codereview.chromium.org/831113002
/external/skia/gm/beziers.cpp
f9d610179d7d4198b57b12d06f8d1ca09f580df3 15-Dec-2014 scroggo <scroggo@google.com> There can be only one (SkRandom)!

Remove SkLCGRandom. We already decided the new one was better, which is
why we wrote the new SkRandom.

Convert GMs that were using SkLCGRandom to use the improved SkRandom.
Motivated by the fact that these GMs draw differently on some runs. We
believe this to be a result of using the old SkLCGRandom.

Add each of the tests that were using SkLCGRandom to ignore-tests.txt,
since we expect they'll draw differently using SkRandom.

Move a trimmed down version of SkLCGRandom into SkDiscretePathEffect.
In order to preserve the old behavior, trim down SkLCGRandom to only
the methods used by SkDiscretePathEffect, and hide it in
SkDiscretePathEffect's cpp file.

BUG=skia:3241

Review URL: https://codereview.chromium.org/805963002
/external/skia/gm/beziers.cpp
a5414c4a8efc3119ee20fcee96c0bf68a04909c7 10-Oct-2014 tfarina <tfarina@chromium.org> Turn SkCanvasStateUtils into a class with static functions.

That simplifies the way to declare it a friend, as needed in SkCanvas.

BUG=skia:2914
TEST=make most
R=reed@google.com

Review URL: https://codereview.chromium.org/645773002
/external/skia/gm/beziers.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/beziers.cpp