aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkGeometry.cpp
Commit message (Collapse)AuthorAge
...
* remove older version of cubic->coeffGravatar reed2015-04-15
| | | | | | | BUG=skia: TBR= Review URL: https://codereview.chromium.org/1084623004
* Speeup hairline curves (quads and cubics) (patchset #7 id:120001 of ↵Gravatar reed2015-04-15
| | | | | | | | | | | | | https://codereview.chromium.org/1078413003/)" ah ha! Check for the define *after* we pull in SkUserConfig.h (indirectly) This reverts commit 639a82855b94b93c4fa45560e67df8ec4a8bbb3a. BUG=skia: TBR= Review URL: https://codereview.chromium.org/1084283003
* Revert of Speeup hairline curves (quads and cubics) (patchset #7 id:120001 ↵Gravatar reed2015-04-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of https://codereview.chromium.org/1078413003/) Reason for revert: Crazy failings in chrome tests http://build.chromium.org/p/client.skia/builders/Linux%20Tests/builds/1862 Original issue's description: > Speeup hairline curves (quads and cubics) > > /skia/trunk> cat ../old.txt > maxrss loops min median mean max stddev samples config bench > 9M 1 4.28ms 4.32ms 4.36ms 4.67ms 3% ▄▁▁▃▂▂▁▁▂█ 8888 path_hairline_small_AA_cubic > 9M 1 743µs 767µs 770µs 825µs 4% ▃▃▇▃▁▁▅▁█▁ 8888 path_hairline_small_AA_conic > 9M 1 533µs 606µs 598µs 680µs 9% ▁▂▂█▆▇▇▄▂▂ 8888 path_hairline_small_AA_quad > 9M 1 451µs 452µs 456µs 495µs 3% ▁▁▁▁█▁▁▁▁▁ 8888 path_hairline_small_AA_line > > /skia/trunk> cat ../new.txt > maxrss loops min median mean max stddev samples config bench > 9M 1 827µs 827µs 831µs 869µs 2% ▁▁▁▁▁▁▁█▁▁ 8888 path_hairline_small_AA_cubic > 9M 1 515µs 517µs 517µs 518µs 0% ▇█▆▅▃▃▁▁▁▅ 8888 path_hairline_small_AA_conic > 9M 1 310µs 311µs 315µs 332µs 2% ▂▁█▆▁▁▁▁▁▁ 8888 path_hairline_small_AA_quad > 9M 1 254µs 254µs 258µs 276µs 3% ▁▁▁▁▁▁▁█▇▂ 8888 path_hairline_small_AA_line > > Edited revert of https://codereview.chromium.org/1085013003 > > TBR= > > Expectations: > - no effect on chrome, as it is guarded > - lots of tiny rebaselines for skia TBR= NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1092483003
* Speeup hairline curves (quads and cubics)Gravatar reed2015-04-15
| | | | | | | | | | | | | | | | | | | | | | /skia/trunk> cat ../old.txt maxrss loops min median mean max stddev samples config bench 9M 1 4.28ms 4.32ms 4.36ms 4.67ms 3% ▄▁▁▃▂▂▁▁▂█ 8888 path_hairline_small_AA_cubic 9M 1 743µs 767µs 770µs 825µs 4% ▃▃▇▃▁▁▅▁█▁ 8888 path_hairline_small_AA_conic 9M 1 533µs 606µs 598µs 680µs 9% ▁▂▂█▆▇▇▄▂▂ 8888 path_hairline_small_AA_quad 9M 1 451µs 452µs 456µs 495µs 3% ▁▁▁▁█▁▁▁▁▁ 8888 path_hairline_small_AA_line /skia/trunk> cat ../new.txt maxrss loops min median mean max stddev samples config bench 9M 1 827µs 827µs 831µs 869µs 2% ▁▁▁▁▁▁▁█▁▁ 8888 path_hairline_small_AA_cubic 9M 1 515µs 517µs 517µs 518µs 0% ▇█▆▅▃▃▁▁▁▅ 8888 path_hairline_small_AA_conic 9M 1 310µs 311µs 315µs 332µs 2% ▂▁█▆▁▁▁▁▁▁ 8888 path_hairline_small_AA_quad 9M 1 254µs 254µs 258µs 276µs 3% ▁▁▁▁▁▁▁█▇▂ 8888 path_hairline_small_AA_line Edited revert of https://codereview.chromium.org/1085013003 TBR= Review URL: https://codereview.chromium.org/1078413003
* Refactor Sk2x<T> + Sk4x<T> into SkNf<N,T> and SkNi<N,T>Gravatar mtklein2015-03-30
| | | | | | | | | | | | | | | | | | | | | The primary feature this delivers is SkNf and SkNd for arbitrary power-of-two N. Non-specialized types or types larger than 128 bits should now Just Work (and we can drop in a specialization to make them faster). Sk4s is now just a typedef for SkNf<4, SkScalar>; Sk4d is SkNf<4, double>, Sk2f SkNf<2, float>, etc. This also makes implementing new specializations easier and more encapsulated. We're now using template specialization, which means the specialized versions don't have to leak out so much from SkNx_sse.h and SkNx_neon.h. This design leaves us room to grow up, e.g to SkNf<8, SkScalar> == Sk8s, and to grown down too, to things like SkNi<8, uint16_t> == Sk8h. To simplify things, I've stripped away most APIs (swizzles, casts, reinterpret_casts) that no one's using yet. I will happily add them back if they seem useful. You shouldn't feel bad about using any of the typedef Sk4s, Sk4f, Sk4d, Sk2s, Sk2f, Sk2d, Sk4i, etc. Here's how you should feel: - Sk4f, Sk4s, Sk2d: feel awesome - Sk2f, Sk2s, Sk4d: feel pretty good No public API changes. TBR=reed@google.com BUG=skia:3592 Review URL: https://codereview.chromium.org/1048593002
* impl SkConvertQuadToCubic w/ Sk2sGravatar reed2015-03-26
| | | | | | | BUG=skia: TBR= Review URL: https://codereview.chromium.org/1041573002
* use new faster/vector impl for chopping conicsGravatar reed2015-03-26
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1035943002
* remove slower scalar code in favor of vectorsGravatar reed2015-03-26
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1001833006
* SkChopCubicAt2 using Sk2s -- 2x fasterGravatar reed2015-03-24
| | | | | | | BUG=skia: TBR= Review URL: https://codereview.chromium.org/1036753002
* cleanup using constructorsGravatar reed2015-03-20
| | | | | | | BUG=skia: TBR= Review URL: https://codereview.chromium.org/1024193002
* use Sk2s for conicsGravatar reed2015-03-20
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1025033002
* use Sk2s for EvalQuadTangent and ChopQuadAtGravatar reed2015-03-20
| | | | | | | | cloned from https://codereview.chromium.org/1026633002/ BUG=skia: Review URL: https://codereview.chromium.org/1024873003
* Try out operator overloads for Sk2x.Gravatar mtklein2015-03-19
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1024473005
* Port to real Sk2f.Gravatar mtklein2015-03-19
| | | | | | | | | | | The bench improves from 39 to 30, about half from porting to Sk2f, half from x.add(x) instead of x.multiply(two). Remove Sk4f Load2/store2 now that we have Sk2f. BUG=skia: Review URL: https://codereview.chromium.org/1019773004
* alt SkEvalQuadAt that returns its answer, using Sk2fGravatar reed2015-03-19
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1011493003
* remove unused SkXRay functionsGravatar reed2015-03-18
| | | | | | | BUG=skia: TBR= Review URL: https://codereview.chromium.org/1016263002
* Remove SK_SUPPORT_LEGACY_CONIC_COMPUTE_QUAD_POW2Gravatar fmalita2015-02-17
| | | | | | | | | The flag is no longer used in Chromium. BUG=458898 R=reed@google.com,robertphillips@google.com Review URL: https://codereview.chromium.org/931663004
* interpret conic tolerance correctly -- big rebaselineGravatar reed2015-02-12
| | | | | | | | | need this to land in chrome https://codereview.chromium.org/918233002/ NOTREECHECKS=True Review URL: https://codereview.chromium.org/915103002
* Use conics for round joins and capsGravatar reed2015-02-10
| | | | | | | | | patch from issue 909013004 at patchset 20001 (http://crrev.com/909013004#ps20001) BUG=skia: TBR=caryclark Review URL: https://codereview.chromium.org/910213002
* use conics for arcToGravatar reed2015-02-09
| | | | | | | | guarded by SK_SUPPORT_LEGACY_ARCTO_QUADS BUG=skia: Review URL: https://codereview.chromium.org/892703002
* use conicsGravatar reed2014-12-17
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/455043002
* Extract cubic classification from gpu into geometryGravatar caryclark2014-12-12
| | | | | | | Move code from the GPU path utilities into geometry so that path ops can share. Review URL: https://codereview.chromium.org/787763007
* Add more debugging for newly failing assert (DM on Xoom bots).Gravatar Mike Klein2014-09-12
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/568823002
* Stub for conic section max curvatureGravatar commit-bot@chromium.org2014-02-21
| | | | | | | | | | | BUG=skia: R=reed@google.com Author: humper@google.com Review URL: https://codereview.chromium.org/175193003 git-svn-id: http://skia.googlecode.com/svn/trunk@13542 2bbb7eff-a529-9590-31e7-b0007b416f81
* update for coding style, remove explicit floatsGravatar commit-bot@chromium.org2014-02-21
| | | | | | | | | | | BUG=skia: R=reed@google.com Author: reed@chromium.org Review URL: https://codereview.chromium.org/174683002 git-svn-id: http://skia.googlecode.com/svn/trunk@13528 2bbb7eff-a529-9590-31e7-b0007b416f81
* That's confusing. Make it clear we're working with 3 points == 9 scalars.Gravatar commit-bot@chromium.org2014-01-28
| | | | | | | | | | | BUG=skia: R=reed@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/148383009 git-svn-id: http://skia.googlecode.com/svn/trunk@13216 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove remaining references to Sk64 (obsolete)Gravatar reed@google.com2014-01-13
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/136673002 git-svn-id: http://skia.googlecode.com/svn/trunk@13042 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove SK_SCALAR_IS_[FLOAT,FIXED] and assume floatsGravatar reed@google.com2013-12-17
| | | | | | | | | | | | | To keep the CL (slightly) managable, this does not make any changes to existing macros (e.g. SkScalarMul). Just tackling #ifdef constructs this time around. BUG= R=bsalomon@google.com, caryclark@google.com Review URL: https://codereview.chromium.org/117053002 git-svn-id: http://skia.googlecode.com/svn/trunk@12712 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove SkFP.h and replace SkFP with SkScalar stop respecting ↵Gravatar reed@google.com2013-12-16
| | | | | | | | | | | SK_SOFTWARE_FLOAT, assume its always false stop respecting SK_SCALAR_SLOW_COMPARES, assume its always false BUG= R=caryclark@google.com Review URL: https://codereview.chromium.org/116183002 git-svn-id: http://skia.googlecode.com/svn/trunk@12686 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove SkFloatToScalar macroGravatar commit-bot@chromium.org2013-11-25
| | | | | | | | | | | BUG= R=reed@google.com, djsollen@google.com Author: caryclark@google.com Review URL: https://codereview.chromium.org/85463005 git-svn-id: http://skia.googlecode.com/svn/trunk@12385 2bbb7eff-a529-9590-31e7-b0007b416f81
* Construct round rects with perpendicular tangents.Gravatar commit-bot@chromium.org2013-11-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The round rects are constructed as before out of quadratics, but without fudging the control points. Instead, the mid on- curve point is nudged slightly outward to prevent the convexity test from failing. The convexity test now includes an error term for sign inequality after computing the cross product of the control lines. When the control points are represented as vectors, the number of bits of precision may be greatly reduced. Account for this by passing the number of bits available from the original control point values into the equality check. Making round rect construction lines perpendicular improves the chances of success when path ops encounters clips. No new tests are needed -- this change is exercised by the convex Path unit tests and the gm tests arcofzorro and hairlines. R=robertphillips@google.com, reed@google.com Author: caryclark@google.com Review URL: https://codereview.chromium.org/48783002 git-svn-id: http://skia.googlecode.com/svn/trunk@12085 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-09-28
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@11513 2bbb7eff-a529-9590-31e7-b0007b416f81
* This CL effectively reverts:Gravatar robertphillips@google.com2013-09-27
| | | | | | | | | | | | | r5997 Altered arcTo's canonical points to (usually) be convex (https://codereview.appspot.com/6709051/) r9928 GM (and fix) for drawArc capping issue (https://codereview.chromium.org/18271003/) Instead of pushing some of the on-curve points out to attain convexity, this patch pulls all the off curve points in. R=reed@google.com Review URL: https://codereview.chromium.org/24810002 git-svn-id: http://skia.googlecode.com/svn/trunk@11504 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add implicit hairline conic rendering to GPUGravatar egdaniel@google.com2013-07-12
| | | | | | | | R=bsalomon@google.com Review URL: https://codereview.chromium.org/18258005 git-svn-id: http://skia.googlecode.com/svn/trunk@10055 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-07-10
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@9948 2bbb7eff-a529-9590-31e7-b0007b416f81
* GM (and fix) for drawArc capping issueGravatar robertphillips@google.com2013-07-09
| | | | | | | | https://codereview.chromium.org/18271003/ git-svn-id: http://skia.googlecode.com/svn/trunk@9928 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-05-08
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@9051 2bbb7eff-a529-9590-31e7-b0007b416f81
* share derivative code with extrema logic, remove some dead code.Gravatar mike@reedtribe.org2013-05-08
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@9050 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix impl for conic derivative (tangent)Gravatar mike@reedtribe.org2013-05-08
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@9049 2bbb7eff-a529-9590-31e7-b0007b416f81
* add (untested) tangent calc for conicsGravatar reed@google.com2013-05-07
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@9048 2bbb7eff-a529-9590-31e7-b0007b416f81
* add routines to compute error between conic and quadGravatar mike@reedtribe.org2013-04-30
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@8916 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-04-28
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@8889 2bbb7eff-a529-9590-31e7-b0007b416f81
* add computation for error in conic-as-quadGravatar mike@reedtribe.org2013-04-27
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@8887 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-04-27
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@8886 2bbb7eff-a529-9590-31e7-b0007b416f81
* add comment for computing max-diff between conic and its bounding quadGravatar reed@google.com2013-04-26
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@8885 2bbb7eff-a529-9590-31e7-b0007b416f81
* rename SkRationalQuad to SkConicGravatar mike@reedtribe.org2013-04-26
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@8872 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-04-17
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@8714 2bbb7eff-a529-9590-31e7-b0007b416f81
* add compute-bounds for conicsGravatar mike@reedtribe.org2013-04-17
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@8713 2bbb7eff-a529-9590-31e7-b0007b416f81
* add extrema for conicsGravatar mike@reedtribe.org2013-04-17
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@8712 2bbb7eff-a529-9590-31e7-b0007b416f81
* add comments for computing derivativesGravatar reed@google.com2013-04-16
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@8711 2bbb7eff-a529-9590-31e7-b0007b416f81