History log of /external/skia/gm/cubicpaths.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
29380bdd56526168d8f8e54d641a1f16b205da4d 09-Oct-2017 Ben Wagner <bungeman@google.com> Remove carriage returns.

Also add a presubmit so they don't get added to source code.

Change-Id: I6a85c6a934b1068a63646a0dcc0d3a08baa96ced
Reviewed-on: https://skia-review.googlesource.com/57110
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
/external/skia/gm/cubicpaths.cpp
2a475eae622adc1e8fa29206be1eaf862c23548e 28-Apr-2017 Cary Clark <caryclark@google.com> add drawString helper to canvas

Many tests and examples use drawText with
a guess of how long the text is in bytes,
or a call to strlen(). Add a helper to
SkCanvas to simplify these examples.

Add another helper for SkString.

R=reed@google.com

Change-Id: I0204a31e938f065606f08ee7cd9a6b36db791ee2
Reviewed-on: https://skia-review.googlesource.com/13642
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Cary Clark <caryclark@skia.org>
/external/skia/gm/cubicpaths.cpp
33d2055e594177b27360f84e0631b26d74a55a9b 22-Mar-2017 Mike Klein <mtklein@chromium.org> GM: some header cleanup

gm.h includes sk_tool_utils.h but does not use it.

The bulk of this CL makes each gm that uses sk_tool_utils include it.

sk_tool_utils.h also provided SkRandom and SkTDArray,
so a couple GMs add those headers too.

Change-Id: Ieb2a7c542f0ca89c3223f744fc11b0ff37af36c1
Reviewed-on: https://skia-review.googlesource.com/10014
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
/external/skia/gm/cubicpaths.cpp
d4631986e6b3a668a4a86e54a0e0027b201188b9 05-Jan-2017 Cary Clark <caryclark@google.com> ignore max curvature at end point

When a stroked cubic folds back on itself, the
stroker draws a round join.
If the max curvature is at
the endpoint, skip the join.

R=reed@google.com
BUG=skia:6083

Change-Id: I45e429432fcec311fa1115058515639370fe9a16
Reviewed-on: https://skia-review.googlesource.com/6606
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
/external/skia/gm/cubicpaths.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/cubicpaths.cpp
4693a1748f19fa4ee83c6eee2333b39ffb3febd4 06-Apr-2016 caryclark <caryclark@google.com> cubic stroke fix

Normally parallel tangents means that the stroke can
be represented with a line. But looping cubics can
have parallel tangents if the loop is 180 degrees.

Check to see if the tangents direction is opposite
to subdivide further.

R=reed@google.com
BUG=skia:5099
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1862753002

Review URL: https://codereview.chromium.org/1862753002
/external/skia/gm/cubicpaths.cpp
6950de6c4166fabb35e6c756fc009e0cf1c47819 07-Nov-2015 halcanary <halcanary@google.com> Comments Style: s/skbug.com/bug.skia.org/
DOCS_PREVIEW= https://skia.org/?cl=1432503003

Review URL: https://codereview.chromium.org/1432503003
/external/skia/gm/cubicpaths.cpp
02833bf0553787484dcb8b602c8ce329ee97d9c3 20-Aug-2015 caryclark <caryclark@google.com> fix override

TBR=herb@google.com

Review URL: https://codereview.chromium.org/1301763006
/external/skia/gm/cubicpaths.cpp
05424f77fa8812b6c9e3a21def954e2c8971886a 20-Aug-2015 caryclark <caryclark@google.com> fix cubic clip in y

Follow on to https://codereview.chromium.org/1299243002/

Clip using a geometric solution if the algebraic solution
fails in Y as well as in X.

If the root finder discovers real roots that are sufficiently
far apart, the root in the range of 0..1 can contain so much
error that it is computed to be slightly smaller than 0 or
larger than 1.

In this case, binary search the mono curve for the actual
answer.

R=reed@google.com

Review URL: https://codereview.chromium.org/1303873003
/external/skia/gm/cubicpaths.cpp
7d173403f47bb85cfd5c42b69c734668e25e47f9 20-Aug-2015 caryclark <caryclark@google.com> subdivide path when side-clipping fails

Please review concept; I'm OK not to check this in.

If the root finder fails, subdivide the curve and try again.
This is complicated by the reversed nature of the curves;
maybe it can be simpler, but how to do that escapes me.

R=reed@google.com
BUG=514246

Review URL: https://codereview.chromium.org/1299243002
/external/skia/gm/cubicpaths.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/cubicpaths.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/cubicpaths.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/cubicpaths.cpp
1818acb6a4b11cd9a1d44ce5dde77452502a9796 24-Jul-2015 caryclark <caryclark@google.com> rename portable_typeface_always to portable_typeface

TBR=reed@google.com

Review URL: https://codereview.chromium.org/1257773002
/external/skia/gm/cubicpaths.cpp
57856a1f589bea64ed84535efed0668221060f9b 12-Jun-2015 caryclark <caryclark@google.com> convert cubicpaths gm tests to portable

TBR=djsollen

Review URL: https://codereview.chromium.org/1182113002
/external/skia/gm/cubicpaths.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/cubicpaths.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/cubicpaths.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/cubicpaths.cpp
992c7b03ef7914a18bfd78e965b0b4c99a5f5672 31-Jul-2014 Cary Clark <caryclark@google.com> Add standard fonts to all GMs.

Allow GM results to be compared across machines and platforms by
standardizing the fonts used by all tests.

This adds runtime flags to DM to use either the system font context (the
default), the fonts in the resources directory ( --resourceFonts ) or a set
of canonical paths generated from the fonts ( --portableFonts ).

This CL should leave the current DM results unchanged by default.

If the portable font data or resource font is missing when DM is run, it
falls back to using the system font context.

The create_test_font tool generates the paths and metrics read by DM
with the --portableFonts flag set, and generates the font substitution
tables read by DM with the --resourceFonts flag set.

If DM is run in SkDebug mode with the --reportUsedChars flag set, it
generates the corresponding data compiled into the create_test_font tool.

All GM tests set their typeface information by calling either

sk_tool_utils::set_portable_typeface or
sk_tool_utils::portable_typeface .

(The former takes the paint, the latter returns a SkTypeface.) These calls
can be removed in the future when the Font Manager can be superceded.

BUG=skia:2687
R=mtklein@google.com

Review URL: https://codereview.chromium.org/407183003
/external/skia/gm/cubicpaths.cpp
5fb6bd4b7e8d00b7f2543ca10ec9022b32632f29 23-Jun-2014 caryclark <caryclark@google.com> use platform-independent font for gm

Create a custom typeface and scaler to render simple paths the
same on all platforms.

GM tests are modified to explicitly select the custom typeface.

R=reed@google.com, mtklein@google.com, bungeman@google.com
TBR=reed

Author: caryclark@google.com

Review URL: https://codereview.chromium.org/348323003
/external/skia/gm/cubicpaths.cpp
a90c6803865766d28e92091f56f718f5e41fe80f 30-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Turn on quilt mode in DM.
- Rename TileGrid -> Quilt to avoid the name overload.
- Tag all failing GMs with kSkipTiled_Flag.

You may be wondering, do any GMs pass? Yes, some do! And that trends towards all of them as we increase --quiltTile.

Two GMs only fail in --quilt mode in 565. Otherwise all GMs which fail are skipped, and those which don't fail aren't. (The 8888 variants of those two GMs are skipped even though they pass.)

BUG=skia:2477
R=reed@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/256373002

git-svn-id: http://skia.googlecode.com/svn/trunk@14457 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/cubicpaths.cpp
e0e7cfe44bb9d66d76120a79e5275c294bacaa22 09-Sep-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Change old PRG to be SkLCGRandom; change new one to SkRandom

The goal here is to get people to start using the new random number
generator, while leaving the old one in place so we don't have to
rebaseline GMs.

R=reed@google.com, bsalomon@google.com

Author: jvanverth@google.com

Review URL: https://chromiumcodereview.appspot.com/23576015

git-svn-id: http://skia.googlecode.com/svn/trunk@11169 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/cubicpaths.cpp
3e2345a8d56cb76bc43e4421a3e9e3681ecd9eba 24-May-2013 skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Sanitizing source files in Housekeeper-Nightly

git-svn-id: http://skia.googlecode.com/svn/trunk@9266 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/cubicpaths.cpp
0f8990cd2cf8bc934efef15c74e4d9439ddac184 23-May-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> use SkScalar instead of int for loops, to avoid warning in canvas->translate() calls

BUG=

Review URL: https://codereview.chromium.org/15875012

git-svn-id: http://skia.googlecode.com/svn/trunk@9263 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/cubicpaths.cpp
03ca64b832819564d958b70ee27a2134ff88c9c6 23-May-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> don't overclamp cubics (see skbug.com/1316)

BUG=

Review URL: https://codereview.chromium.org/15924003

git-svn-id: http://skia.googlecode.com/svn/trunk@9262 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/cubicpaths.cpp
22999c61d8a89f8f5920dc3ad494a88f57718770 23-May-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> add comment

add test for skbug/com/1316

BUG=

Review URL: https://codereview.chromium.org/15790006

git-svn-id: http://skia.googlecode.com/svn/trunk@9261 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/cubicpaths.cpp
eed625df23ee83a94f1814c43744b1961b79adf1 09-Mar-2013 skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Sanitizing source files in Skia_Periodic_House_Keeping

git-svn-id: http://skia.googlecode.com/svn/trunk@8059 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/cubicpaths.cpp
27b90fae0e0ea159c2d2fe4b028be5859258267a 08-Mar-2013 reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> update to use DEF_GM



git-svn-id: http://skia.googlecode.com/svn/trunk@8048 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/cubicpaths.cpp
d6176b0dcacb124539e0cfd051e6d93a9782f020 23-Aug-2012 rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/)

This CL is part II of IV (I broke down the 1280 files into 4 CLs).
Review URL: https://codereview.appspot.com/6474054

git-svn-id: http://skia.googlecode.com/svn/trunk@5263 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/cubicpaths.cpp
0b71f6cedd57de177b8368c48dfaab14feda9677 04-Jan-2012 schenney@chromium.org <schenney@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Removing path drawing gm tests that produce either an entirely
filled or entirely empty clip area. Requested but not reviewed by
reed@google.com.

TEST=Covered now by unit testing.

git-svn-id: http://skia.googlecode.com/svn/trunk@2956 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/cubicpaths.cpp
45cbfdd53533693927ac13d44e42104269ce7a9e 20-Dec-2011 schenney@chromium.org <schenney@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Unreviewed changes to the gm tests for paths. Each test is broken into four
smaller images to avoid problems with XPS on Windows hanging on large images.

git-svn-id: http://skia.googlecode.com/svn/trunk@2911 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/cubicpaths.cpp
4da06ab3351f2a96f9216d96106db33a77b19644 20-Dec-2011 schenney@chromium.org <schenney@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Modifying SkPath to store all verbs provided by the user, and to give
correct results for all stroke and fill modes even on the various types
of degenerate paths.

The goals of this patch include:
1. Have Skia store all of the verbs implied by path construction methods, even
if those define degenerate paths. The SVG implementation in WebKit, which is
backed by Skia, needs to know about all elements of the path, even degenerate
ones, for the correct drawing of markers and line caps. For example, in SVG you
should be able to draw a scatter plot by specifying a marker for vertices and
then giving a sequence of moveTo commands. Skia will not store the moveTos,
requiring a different storage mechanism.

2. Assuming 1, maintain the current Skia behavior. That is, make Skia robust to
degenerate paths.

3. Fix an existing bug in Skia where a degenerate moveTo-lineTo pair spits out
warnings from rasterization and produces incorrect results in inverse-fill
renderings.

4. Adds extensive testing for degenerate paths and path rendering in general.

To meet these goals, the patch I am proposing will result in minor additional
storage for degenerate paths (a few bytes per degenerate path, only if the user
defines such paths). There is also some additional overhead in the iteration
code, with the path now cleaned to remove degenerate segments as part of the
iteration process. I suspect this will also fix issues with computing normal
vectors to degenerate segments. Benchmarking suggests that this change may
result in slightly (< 1%) slower path drawing due to the checks for
degeneracy. This overhead could be removed (in fact, a significant speedup
could occur) if the results of iterating to clean up the path were cached.
This would cost memory, of course, and quite a bit of it.

BUG=398
TEST=tests/PathTest.cpp
gm/cubicpaths.cpp
gm/degeneratesegments.cpp
gm/movepaths.cpp
gm/linepaths.cpp
gm/quadpaths.cpp
Review URL: http://codereview.appspot.com/5482051

git-svn-id: http://skia.googlecode.com/svn/trunk@2901 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/gm/cubicpaths.cpp