aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkEdgeBuilder.h
Commit message (Collapse)AuthorAge
* check for non-finite values output by clipperGravatar Mike Reed2018-04-12
| | | | | | | | | | Bug: oss-fuzz:7452 Change-Id: Id1b9bd1ad9245f32d69b7ce97544955fcde5670f Reviewed-on: https://skia-review.googlesource.com/121102 Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Cary Clark <caryclark@google.com> Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Mike Reed <reed@google.com>
* No chop at y extrema for cubicsGravatar Yuqian Li2017-08-09
| | | | | | | | | | | | | | | | | | The new Delta AA scan converter does not need the edge to be updated with monotonic Y so chopping at y extrema is not necessary. Removing such chopping brings ~10% performance increase to chalkboard.svg which has tons of small cubics (the same is true for many svgs I saw). We didn't remove the chopping for quads because that does not bring a significant speedup. Moreover, dropping those y extremas would make our strokecircle animation look a little more wobbly (because we would have fewer divisions for the quads at the top and bottom of the circle). Bug: skia: Change-Id: I3984d2619f9f77269ed24e8cbfa9f1429ebca4a8 Reviewed-on: https://skia-review.googlesource.com/31940 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* New analytic AA scan converter using delta (I call it DAA for now)Gravatar Yuqian Li2017-07-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DAA is: 1. Much simpler than AAA. SkScan_AAAPath.cpp is about 1700 lines. SkScan_DAAPath.cpp is about 300 lines. The whole DAA CL is only about 800 lines. 2. Much faster than AAA for complicated paths. The speedup applies to GL backend (including ccpr)! Here's the frame time of 'SampleApp --slide Chart' on macbook pro: AAA-raster: 33ms DAA-raster: 21ms AAA-gl: 30ms DAA-gl: 20ms AAA-ccpr: 18ms DAA-ccpr: 12ms My linux desktop doesn't have SSE3 so the speedup is smaller (~25% for Chart). I believe that DAA is so fast that I can enable it for any paths (AAA is not enabled by default for complicated paths because it is slow; hence our older supersampling scan converter is used for stroking on Chart for AAA-xxx config.) 3. The SkCoverageDelta is suitable for threaded backend with out-of-order concurrent scan conversion as commented in the source code. Maybe we can also just send deltas to GPU. 4. Similar to most analytic path renderers, the quality is on the best ground-truth level, unless there are intersections within a pixel. The intersections look good to my eyes although theoretically that could be arbitrary far from the ground truth (see my AAA slides). 5. For simple paths, such as circle, triangle, rrect, etc., DAA is slower than AAA. But DAA is faster than our older supersampling scan converter in most cases. As those simple paths usually don't constitute the bottleneck of a picture (skp or svg), I strongly recommend use DAA. 6. DAA also heavily favors blitMask so it may work quite well with SkRasterPipeline and SkRasterPipelineBlitter. Finally, please check https://skia-review.googlesource.com/c/22420/ which accelerate DAA by specializing blitCoverageDeltas for SkARGB32_Blitter and SkARGB32_Black_Blitter. It brings a little(<5%) speedup. But I couldn't figure out how to reduce the duplicate code so I don't intend to land it. Bug: skia: Change-Id: I3b7ed6a727447922e645b1acb737a506e7c09a4c Reviewed-on: https://skia-review.googlesource.com/19666 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Explicitly check edge count >= 2 in non-debug buildGravatar Yuqian Li2017-05-26
| | | | | | | | | | | We also preserve the check in debug mode that the count should never be 1 when the path is convex. Bug: skia:6684 Change-Id: I4d4c9ad9f9d704e94bbe51f10a96f8b3066afaa1 Reviewed-on: https://skia-review.googlesource.com/17983 Commit-Queue: Yuqian Li <liyuqian@google.com> Reviewed-by: Mike Reed <reed@google.com>
* SkSTArenaAllocGravatar Florin Malita2017-05-24
| | | | | | | | | Syntactic sugar, gets rid of some boilerplate. Change-Id: Ibdb28b7a8f1d5e4a4e18c12d423b987d7194e340 Reviewed-on: https://skia-review.googlesource.com/17837 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Herb Derby <herb@google.com>
* fix scan converter arena allocGravatar Cary Clark2017-04-14
| | | | | | | | | | | | | Removing the 16K alloc sped up pathops_unittest -x -V Release on Windows 7; time went from 14 minutes to 4. R=herb@google.com BUG=skia:6509 Change-Id: If43c9ad6745961e0079a7f4f6560c6fa2a7847ef Reviewed-on: https://skia-review.googlesource.com/13507 Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Herb Derby <herb@google.com>
* Revert "Use inline storage for SkEdgeBuilder."Gravatar Mike Klein2017-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit be32a432af7aab06ab1457cec35789da85b40bbe. Reason for revert: Google3 stacks are smaller than you might hope. "the frame size of 25584 bytes is larger than 16384 bytes; see http://go/big_stack_frame" Original change's description: > Use inline storage for SkEdgeBuilder. > > Change-Id: I06d9ee759a366d6c2c11341e15e671f5a1f87ae7 > Reviewed-on: https://skia-review.googlesource.com/9164 > Reviewed-by: Yuqian Li <liyuqian@google.com> > Commit-Queue: Herb Derby <herb@google.com> > TBR=herb@google.com,liyuqian@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I496e37754977c598f3cf30c7a0fbc4954a58152c Reviewed-on: https://skia-review.googlesource.com/9181 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Use inline storage for SkEdgeBuilder.Gravatar Herb Derby2017-03-02
| | | | | | | Change-Id: I06d9ee759a366d6c2c11341e15e671f5a1f87ae7 Reviewed-on: https://skia-review.googlesource.com/9164 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Use SkArenaAlloc in SkEdgeBuilder.Gravatar Herb Derby2017-03-01
| | | | | | | Change-Id: Ie3557469d018b857dc6fb4543d367fcd8768f0b7 Reviewed-on: https://skia-review.googlesource.com/9115 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Resubmit issue 2221103002 to fix the iOS build by declaring the flag inGravatar liyuqian2016-10-04
| | | | | | | | | | | SkCommonFlags.h TBR=reed@google.com,caryclark@google.com BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2393643002 Review-Url: https://codereview.chromium.org/2393643002
* Revert of Analytic AntiAlias for Convex Shapes (patchset #14 id:260001 of ↵Gravatar stephana2016-10-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/2221103002/ ) Reason for revert: Breaks iOS build. Original issue's description: > Implement AnalyticAA for convex shapes. > > Design doc: go/analyticAA > > A performance test can be found here: https://docs.google.com/a/google.com/spreadsheets/d/1n9LSjFzrQzx0hovFddWey0GSMXNRjl1oFuSypMlHWZk/edit?usp=sharing > > Our best case is filling big triangles, which according to our experiment has ~2.9x speedup. Our worst case is filling small ovals/circles, which has a ~1.06x slowdown. > > To see how our new algorithm changes the DM images, see: https://x20web.corp.google.com/~liyuqian/dmdiff/index.html > The most significant changes are in convexpaths and analytic_antialias_convex > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2221103002 > > Committed: https://skia.googlesource.com/skia/+/7795822807478143120c33228b68d2ab3918af2c TBR=reed@google.com,caryclark@google.com,liyuqian@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review-Url: https://codereview.chromium.org/2388213003
* Implement AnalyticAA for convex shapes.Gravatar liyuqian2016-10-04
| | | | | | | | | | | | | | | | Design doc: go/analyticAA A performance test can be found here: https://docs.google.com/a/google.com/spreadsheets/d/1n9LSjFzrQzx0hovFddWey0GSMXNRjl1oFuSypMlHWZk/edit?usp=sharing Our best case is filling big triangles, which according to our experiment has ~2.9x speedup. Our worst case is filling small ovals/circles, which has a ~1.06x slowdown. To see how our new algorithm changes the DM images, see: https://x20web.corp.google.com/~liyuqian/dmdiff/index.html The most significant changes are in convexpaths and analytic_antialias_convex BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2221103002 Review-Url: https://codereview.chromium.org/2221103002
* Style bikeshed - remove extraneous whitespaceGravatar halcanary2016-03-29
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1842753002 Review URL: https://codereview.chromium.org/1842753002
* combine vertical overlapping edgesGravatar caryclark2016-01-30
| | | | | | | | | | | | Paths outside clips, and sometimes paths inside clips, devolve to multiple adjacent or overlapping vertical edges. Combine these edges when possible to reduce the overall edge count. R=reed@google.com BUG=573166 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1654433002 Review URL: https://codereview.chromium.org/1654433002
* Faster edge re-sortGravatar reed2015-02-07
| | | | | | | | | | | For now, disable dropping trailing edges This reverts commit 0692c5f2c1df7d1b66c62025200dd666f9ecd311. BUG=skia: TBR= Review URL: https://codereview.chromium.org/882733004
* Revert of Faster edge re-sort, drop trailing edges (patchset #2 id:20001 of ↵Gravatar reed2015-02-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/907623002/) Reason for revert: still layout failures Original issue's description: > Faster edge re-sort, drop trailing edges > > (patchset #4 id:60001 of https://codereview.chromium.org/891613003/)" > > This reverts commit c319d075eab86cacfd7aba27859b72bbf8fc0a64. > > BUG=skia: > TBR= > > Committed: https://skia.googlesource.com/skia/+/2322115952c15c72a623837879cac1f85894b1b6 TBR= NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/886503010
* Faster edge re-sort, drop trailing edgesGravatar reed2015-02-06
| | | | | | | | | | | (patchset #4 id:60001 of https://codereview.chromium.org/891613003/)" This reverts commit c319d075eab86cacfd7aba27859b72bbf8fc0a64. BUG=skia: TBR= Review URL: https://codereview.chromium.org/907623002
* Revert of faster edge re-sort, drop trailing edges (patchset #4 id:60001 of ↵Gravatar reed2015-02-06
| | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/891613003/) Reason for revert: may be breaking layouttests... Original issue's description: > faster edge re-sort, drop trailing edges > > 1. drop edges that are wholly on the right (in the non-convex walker) > 2. scan and swap once, instead of swapping as we go during re-sort > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/38f1c00772539dcbeccbfa3c45d94bdc4acf3518 TBR=caryclark@google.com,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/910493002
* faster edge re-sort, drop trailing edgesGravatar reed2015-02-06
| | | | | | | | | 1. drop edges that are wholly on the right (in the non-convex walker) 2. scan and swap once, instead of swapping as we go during re-sort BUG=skia: Review URL: https://codereview.chromium.org/891613003
* bump picture version since SkPath has changed (conics)Gravatar reed@google.com2013-05-31
| | | | | | enable conics in SkPath git-svn-id: http://skia.googlecode.com/svn/trunk@9370 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "add asserts to point<-->verb helpers"Gravatar reed@google.com2013-05-30
| | | | | | This reverts commit b4775ac7b55802e87231768f002e4b42f233b0aa. git-svn-id: http://skia.googlecode.com/svn/trunk@9347 2bbb7eff-a529-9590-31e7-b0007b416f81
* add asserts to point<-->verb helpersGravatar reed@google.com2013-05-30
| | | | | | | | | | patch from issue 16153005 BUG= Review URL: https://codereview.chromium.org/16195004 git-svn-id: http://skia.googlecode.com/svn/trunk@9344 2bbb7eff-a529-9590-31e7-b0007b416f81
* Result of running tools/sanitize_source_files.py (which was added in ↵Gravatar rmistry@google.com2012-08-23
| | | | | | | | | https://codereview.appspot.com/6465078/) This CL is part I of IV (I broke down the 1280 files into 4 CLs). Review URL: https://codereview.appspot.com/6485054 git-svn-id: http://skia.googlecode.com/svn/trunk@5262 2bbb7eff-a529-9590-31e7-b0007b416f81
* special-case edge-building for polygons (paths with only lines)Gravatar reed@google.com2012-08-02
| | | | | | | makes the dashing bench faster (from 13.4 -> 11.5 ticks) Review URL: https://codereview.appspot.com/6449080 git-svn-id: http://skia.googlecode.com/svn/trunk@4916 2bbb7eff-a529-9590-31e7-b0007b416f81
* Automatic update of all copyright notices to reflect new license terms.Gravatar epoger@google.com2011-07-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have manually examined all of these diffs and restored a few files that seem to require manual adjustment. The following files still need to be modified manually, in a separate CL: android_sample/SampleApp/AndroidManifest.xml android_sample/SampleApp/res/layout/layout.xml android_sample/SampleApp/res/menu/sample.xml android_sample/SampleApp/res/values/strings.xml android_sample/SampleApp/src/com/skia/sampleapp/SampleApp.java android_sample/SampleApp/src/com/skia/sampleapp/SampleView.java experimental/CiCarbonSampleMain.c experimental/CocoaDebugger/main.m experimental/FileReaderApp/main.m experimental/SimpleCocoaApp/main.m experimental/iOSSampleApp/Shared/SkAlertPrompt.h experimental/iOSSampleApp/Shared/SkAlertPrompt.m experimental/iOSSampleApp/SkiOSSampleApp-Base.xcconfig experimental/iOSSampleApp/SkiOSSampleApp-Debug.xcconfig experimental/iOSSampleApp/SkiOSSampleApp-Release.xcconfig gpu/src/android/GrGLDefaultInterface_android.cpp gyp/common.gypi gyp_skia include/ports/SkHarfBuzzFont.h include/views/SkOSWindow_wxwidgets.h make.bat make.py src/opts/memset.arm.S src/opts/memset16_neon.S src/opts/memset32_neon.S src/opts/opts_check_arm.cpp src/ports/SkDebug_brew.cpp src/ports/SkMemory_brew.cpp src/ports/SkOSFile_brew.cpp src/ports/SkXMLParser_empty.cpp src/utils/ios/SkImageDecoder_iOS.mm src/utils/ios/SkOSFile_iOS.mm src/utils/ios/SkStream_NSData.mm tests/FillPathTest.cpp Review URL: http://codereview.appspot.com/4816058 git-svn-id: http://skia.googlecode.com/svn/trunk@1982 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix warning (struct forward-declared as class).Gravatar senorblanco@chromium.org2009-12-04
| | | | | | | Review URL: http://codereview.appspot.com/164061 git-svn-id: http://skia.googlecode.com/svn/trunk@451 2bbb7eff-a529-9590-31e7-b0007b416f81
* new scanconversion techniqueGravatar reed@android.com2009-11-18
This technique geometrically clips all segments against the clip bounds, ensuring that we never send a value to the edgelist that might overflow in fixedpoint. Current disabled in SkScan_Path.cpp by a #define. There are a few minor pixel differences between this and the old technique, as found by the gm tool, so at the moment this new code is off by default. git-svn-id: http://skia.googlecode.com/svn/trunk@432 2bbb7eff-a529-9590-31e7-b0007b416f81