aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench
Commit message (Collapse)AuthorAge
* Revert "Use scratch keys for stencil buffers."Gravatar bsalomon2014-11-24
| | | | | | | | | | | | | | | | This reverts commit 91175f19664a62851da4ca4e0984a7c7c45b258f. Revert "Cleanup res cache bench and split out into a unit test." This reverts commit 4e4303f002c5958c6c958e7ba8e49b24c25f0b22. Revert "rebaselines" This reverts commit 65ba7b57759bfca60b24bc34dc46fc8caaf146f0. TBR=tomhudson@google.com Review URL: https://codereview.chromium.org/752233002
* add some debugging to SkNVRefCntGravatar reed2014-11-24
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/745383003
* Cleanup res cache bench and split out into a unit test.Gravatar bsalomon2014-11-24
| | | | | | BUG=skia:2889 Review URL: https://codereview.chromium.org/754833002
* Use scratch keys for stencil buffers.Gravatar bsalomon2014-11-24
| | | | | | BUG=skia:2889 Review URL: https://codereview.chromium.org/747043004
* Fix memory leak in nanobenchGravatar robertphillips2014-11-21
| | | | | | This is cleanup for (Add MultiPictureDraw to nanobench - https://codereview.chromium.org/731973005/) Review URL: https://codereview.chromium.org/730343003
* Add MultiPictureDraw to nanobenchGravatar robertphillips2014-11-21
| | | | | | | | | | I would like some guard against performance regressions on our side before turning layer hoisting on in Chromium. TBR=bsalomon@google.com Committed: https://skia.googlesource.com/skia/+/0ddad31012dabfc1267effc8071d37f7d606efbe Review URL: https://codereview.chromium.org/731973005
* Revert of Add MultiPictureDraw to nanobench (patchset #7 id:120001 of ↵Gravatar robertphillips2014-11-21
| | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/731973005/) Reason for revert: Needs more work Original issue's description: > Add MultiPictureDraw to nanobench > > I would like some guard against performance regressions on our side before turning layer hoisting on in Chromium. > > TBR=bsalomon@google.com > > Committed: https://skia.googlesource.com/skia/+/0ddad31012dabfc1267effc8071d37f7d606efbe TBR=mtklein@google.com,bsalomon@google.com NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/750583002
* Add MultiPictureDraw to nanobenchGravatar robertphillips2014-11-21
| | | | | | | | I would like some guard against performance regressions on our side before turning layer hoisting on in Chromium. TBR=bsalomon@google.com Review URL: https://codereview.chromium.org/731973005
* Add computation of saveLayer information to RecordingBenchGravatar robertphillips2014-11-18
| | | | | | In (Add flag to beginRecording to request saveLayer information - https://codereview.chromium.org/721883002/) I claimed the extra recording cost would be negligible. This CL attempts to put some numbers behind that. Review URL: https://codereview.chromium.org/741523002
* Prune SkRTreeGravatar mtklein2014-11-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Propagate a bunch of constant parameters through. - Delete code that's not used when bulk loading. - Allocate all Nodes together. - Stay in SkRect. Doing a single malloc for the nodes can't not have improved memory usage. Looks like this might improve record performance ~5%, probably mostly from staying in SkRects. This finally dethrones building the BBH as the hot spot. (Now it's mapping user bounds back to device bounds and adjusting for paints.) Recording time changes from my MBP: desk_rectangletransition.skp 11.5us -> 11.7us 1x desk_forecastio.skp 115us -> 114us 0.98x desk_booking.skp 550us -> 541us 0.98x tabl_mercurynews.skp 176us -> 173us 0.98x tabl_hsfi.skp 294us -> 287us 0.98x desk_wordpress.skp 351us -> 343us 0.98x tabl_worldjournal.skp 439us -> 426us 0.97x tabl_gmail.skp 20.3us -> 19.7us 0.97x desk_youtubetvvideo.skp 10.8us -> 10.4us 0.97x desk_googleplus.skp 1.1ms -> 1.07ms 0.97x tabl_slashdot.skp 106us -> 103us 0.97x desk_jsfiddlebigcar.skp 26.7us -> 25.7us 0.96x tabl_techmeme.skp 95.4us -> 91.7us 0.96x tabl_deviantart.skp 133us -> 127us 0.96x desk_pinterest.skp 40.6us -> 38.9us 0.96x desk_carsvg.skp 195us -> 187us 0.96x tabl_engadget.skp 376us -> 359us 0.96x tabl_sahadan.skp 60.5us -> 57.5us 0.95x tabl_culturalsolutions.skp 255us -> 242us 0.95x tabl_gspro.skp 58.3us -> 55.5us 0.95x desk_linkedin.skp 146us -> 138us 0.94x desk_ebay.skp 192us -> 181us 0.94x tabl_cnn.skp 467us -> 440us 0.94x desk_jsfiddlehumperclip.skp 29.9us -> 28.1us 0.94x desk_tigersvg.skp 43.2us -> 40.5us 0.94x desk_yahooanswers.skp 131us -> 123us 0.94x desk_googlespreadsheetdashed.skp 1.18ms -> 1.11ms 0.94x desk_blogger.skp 193us -> 181us 0.94x tabl_mozilla.skp 1.82ms -> 1.7ms 0.94x tabl_mlb.skp 145us -> 136us 0.93x mobi_wikipedia.skp 577us -> 539us 0.93x tabl_frantzen.skp 54.1us -> 50.4us 0.93x desk_baidu.skp 87.9us -> 81.9us 0.93x desk_techcrunch.skp 224us -> 209us 0.93x desk_sfgate.skp 206us -> 192us 0.93x tabl_ukwsj.skp 269us -> 250us 0.93x desk_facebook.skp 316us -> 293us 0.93x desk_gmailthread.skp 205us -> 190us 0.93x tabl_googlecalendar.skp 158us -> 147us 0.93x tabl_digg.skp 382us -> 354us 0.93x desk_amazon.skp 106us -> 98.5us 0.93x tabl_androidpolice.skp 693us -> 642us 0.93x tabl_nytimes.skp 206us -> 191us 0.92x desk_gws.skp 124us -> 114us 0.92x desk_youtube.skp 255us -> 235us 0.92x tabl_cuteoverload.skp 583us -> 537us 0.92x desk_oldinboxapp.skp 18us -> 16.6us 0.92x desk_mobilenews.skp 297us -> 273us 0.92x tabl_pravda.skp 168us -> 154us 0.92x tabl_vnexpress.skp 236us -> 217us 0.92x desk_css3gradients.skp 202us -> 185us 0.92x tabl_gamedeksiam.skp 508us -> 464us 0.91x desk_wowwiki.skp 1.02ms -> 929us 0.91x desk_espn.skp 209us -> 191us 0.91x desk_chalkboard.skp 315us -> 284us 0.9x desk_mapsvg.skp 607us -> 543us 0.89x desk_pokemonwiki.skp 5.18ms -> 4.62ms 0.89x desk_samoasvg.skp 335us -> 298us 0.89x desk_youtubetvbrowse.skp 10.1us -> 8.59us 0.85x BUG=skia:3085, skia:2834 Review URL: https://codereview.chromium.org/734723002
* Do not calculate many sierpinski fractals for each nanobench run unless neededGravatar kkinnunen2014-11-18
| | | | | | | | | | Removes work done by the constructors of picture_nesting benches, and moves the work to the Benchmark::onPreDraw override. This avoids PictureNesting::sierpinsky showing up in profile traces when profiling other benches. Review URL: https://codereview.chromium.org/725523002
* Make GrResourceCache2 responsible for calling release, abandon, and ~.Gravatar bsalomon2014-11-14
| | | | | | | | | | BUG=skia:2889 TBR=robertphillips@google.com NOTRY=true Review URL: https://codereview.chromium.org/729683002
* Replace GrResourceCache with GrResourceCache2.Gravatar bsalomon2014-11-14
| | | | | | | | | | BUG=skia:2889 Committed: https://skia.googlesource.com/skia/+/66a450f21a3da174b7eed89a1d5fc8591e8b6ee6 Committed: https://skia.googlesource.com/skia/+/407aa584d183c1bf314f5defd1cf0202e8a96c89 Review URL: https://codereview.chromium.org/716143004
* Revert of Replace GrResourceCache with GrResourceCache2. (patchset #7 ↵Gravatar bsalomon2014-11-14
| | | | | | | | | | | | | | | | | | | | | | | id:120001 of https://codereview.chromium.org/716143004/) Reason for revert: broken again Original issue's description: > Replace GrResourceCache with GrResourceCache2. > > BUG=skia:2889 > > Committed: https://skia.googlesource.com/skia/+/66a450f21a3da174b7eed89a1d5fc8591e8b6ee6 > > Committed: https://skia.googlesource.com/skia/+/407aa584d183c1bf314f5defd1cf0202e8a96c89 TBR=robertphillips@google.com NOTREECHECKS=true NOTRY=true BUG=skia:2889 Review URL: https://codereview.chromium.org/726913002
* Replace GrResourceCache with GrResourceCache2.Gravatar bsalomon2014-11-14
| | | | | | | | BUG=skia:2889 Committed: https://skia.googlesource.com/skia/+/66a450f21a3da174b7eed89a1d5fc8591e8b6ee6 Review URL: https://codereview.chromium.org/716143004
* Revert of Replace GrResourceCache with GrResourceCache2. (patchset #6 ↵Gravatar bsalomon2014-11-13
| | | | | | | | | | | | | | | | | | | | | id:100001 of https://codereview.chromium.org/716143004/) Reason for revert: Breaking stuff Original issue's description: > Replace GrResourceCache with GrResourceCache2. > > BUG=skia:2889 > > Committed: https://skia.googlesource.com/skia/+/66a450f21a3da174b7eed89a1d5fc8591e8b6ee6 TBR=robertphillips@google.com NOTREECHECKS=true NOTRY=true BUG=skia:2889 Review URL: https://codereview.chromium.org/715333003
* Replace GrResourceCache with GrResourceCache2.Gravatar bsalomon2014-11-13
| | | | | | BUG=skia:2889 Review URL: https://codereview.chromium.org/716143004
* Revert of Make nanobench and dm be usable from Chromium build (patchset #5 ↵Gravatar jcgregorio2014-11-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:80001 of https://codereview.chromium.org/657373002/) Reason for revert: Causing breakages on Mac build. Original issue's description: > Make nanobench and dm be usable from Chromium build > > Move the app logic for each app as follows: > > <app>.cpp -- the file which contains main(). Embedders that compile > their own apps, such as ios shell, upcoming Chromium dm etc, do not use this. > > <app>_main.cpp -- the main logic of the Skia test application. This will be > used by Skia -compiled apps as well as embedder -compiled apps. > > <app>_main.h -- the API for the main logic. This will be > used by Skia -compiled apps as well as embedder -compiled apps. > > This way (the upcoming) Chromium dm can setup its Chromium-specific setup > in custom main(), and then call dm_main(), without the need of any > SK_BUILD_FOR_XXXX defines controlling whether the tool defines main or not. > > BUG=skia:2992 > > Committed: https://skia.googlesource.com/skia/+/c092d3bdab5f723576cc0346cea3ee282a9cb444 TBR=mtklein@chromium.org,mtklein@google.com,borenet@google.com,kkinnunen@nvidia.com NOTREECHECKS=true NOTRY=true BUG=skia:2992 Review URL: https://codereview.chromium.org/724073002
* Make nanobench and dm be usable from Chromium buildGravatar kkinnunen2014-11-13
| | | | | | | | | | | | | | | | | | | | | Move the app logic for each app as follows: <app>.cpp -- the file which contains main(). Embedders that compile their own apps, such as ios shell, upcoming Chromium dm etc, do not use this. <app>_main.cpp -- the main logic of the Skia test application. This will be used by Skia -compiled apps as well as embedder -compiled apps. <app>_main.h -- the API for the main logic. This will be used by Skia -compiled apps as well as embedder -compiled apps. This way (the upcoming) Chromium dm can setup its Chromium-specific setup in custom main(), and then call dm_main(), without the need of any SK_BUILD_FOR_XXXX defines controlling whether the tool defines main or not. BUG=skia:2992 Review URL: https://codereview.chromium.org/657373002
* Make GrGpuResource::gpuMemorySize non-virtual w/ onGpuMemorySize virtual implGravatar bsalomon2014-11-12
| | | | | | BUG=skia:2889 Review URL: https://codereview.chromium.org/702413003
* Add benchmark to compare different BBH query patterns.Gravatar mtklein2014-11-11
| | | | | | | | | | | | | | | | | On my laptop: maxrss loops min median mean max stddev samples config bench 37M 1 14ms 14.2ms 14.6ms 18.2ms 9% ▁█▁▁▁▁▂▂▂▁ gpu tiled_playback_tilegrid_tiled 40M 1 17ms 17.2ms 17.2ms 17.6ms 1% ▆▃▁█▄▇▂▁▁▁ gpu tiled_playback_tilegrid_random 40M 1 14.6ms 14.9ms 15.8ms 19.1ms 11% ▂▁▁▁▁▁▁█▅█ gpu tiled_playback_rtree_tiled 43M 1 16.5ms 16.7ms 16.8ms 17.4ms 1% ▂▃▅█▃▂▁▃▃▂ gpu tiled_playback_rtree_random 43M 1 15.9ms 16.1ms 16.5ms 18.7ms 6% ▁▁█▇▁▁▁▂▁▁ gpu tiled_playback_none_tiled 44M 1 17.9ms 17.9ms 18ms 18.1ms 1% ▂▁▅▁▇▃▁▂█▇ gpu tiled_playback_none_random TileGrid and RTree perform pretty much the same, both beating no BBH. BUG=skia:3085 Review URL: https://codereview.chromium.org/699313006
* Avoid warning in nanobench related to loop count with nvprmsaa4Gravatar kkinnunen2014-11-11
| | | | | | | | | | | | | | | | | | | | | | The tests path_hairline_{small,big}_AA_conic were calling the test function with NVPR. This caused a warning in nanobench. The here removed hunk comes from commit referring to skia:2042 ("Enable NVPR by default"). This is a workaround for a bug. The bug is fixed by the commit referring to skia:2078 ("Logan bot fails NVPR assertion in bench"). The proper fix is indeed make sure that path renderer chain ends up trying software path renderer, if the path contains conics and is a hairline. The removed hunk refers also to skia:2033 ("Figure out what is happening with conic path segments in NVPR"). The above solution is correct also in case NVPR would support conics, as NVPR would not still support hairlines. BUG=skia:2078 Review URL: https://codereview.chromium.org/685213005
* Use GrResourceCache2 to service content key lookupsGravatar bsalomon2014-11-10
| | | | | | BUG=skia:2889 Review URL: https://codereview.chromium.org/707493002
* Get gpudft support working in dm, gm, nanobench and bench_picturesGravatar jvanverth2014-11-07
| | | | | | | | | | | | Adds a new config to test distance field text. Clean up some flags and #defines to read "distance field text", not "distance field fonts" to be consistent with Chromium NOTREECHECKS=true Committed: https://skia.googlesource.com/skia/+/06ba179838ba4fe187cf290750aeeb4a02a2960b Review URL: https://codereview.chromium.org/699453005
* Revert of Get gpudft support working in dm, gm, nanobench and bench_pictures ↵Gravatar jvanverth2014-11-06
| | | | | | | | | | | | | | | | | | | | | | | | (patchset #2 id:20001 of https://codereview.chromium.org/699453005/) Reason for revert: Not compiling in ANGLE build Original issue's description: > Get gpudft support working in dm, gm, nanobench and bench_pictures > > Adds a new config to test distance field text. > Clean up some flags and #defines to read "distance field text", > not "distance field fonts" to be consistent with Chromium > > NOTREECHECKS=true > > Committed: https://skia.googlesource.com/skia/+/06ba179838ba4fe187cf290750aeeb4a02a2960b TBR=bsalomon@google.com,mtklein@google.com,reed@google.com NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/707723005
* Get gpudft support working in dm, gm, nanobench and bench_picturesGravatar jvanverth2014-11-06
| | | | | | | | | | Adds a new config to test distance field text. Clean up some flags and #defines to read "distance field text", not "distance field fonts" to be consistent with Chromium NOTREECHECKS=true Review URL: https://codereview.chromium.org/699453005
* Detect loops overflow for gpu benches.Gravatar mtklein2014-11-06
| | | | | | | | NOTREECHECKS=true BUG=skia: Review URL: https://codereview.chromium.org/709473002
* PictureRecordBench's benchmarks are no longer relevant with SkRecord.Gravatar mtklein2014-11-04
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/698163004
* Try out SkTree in nanobench.Gravatar mtklein2014-10-29
| | | | | | | | Looks like a fairly large recording speed win with no playback cost. BUG=skia: Review URL: https://codereview.chromium.org/653023003
* rename GrTextureDesc->GrSurfaceDesc, GrTextureFlags->GrSurfaceFlagsGravatar bsalomon2014-10-28
| | | | Review URL: https://codereview.chromium.org/682223002
* Cut down SkBBH API more.Gravatar mtklein2014-10-27
| | | | | | | | | | | | | | - The expected case is now a single bulk-load insert() call instead of N; - reserve() and flushDeferredInserts() can fold into insert() now; - SkBBH subclasses may take ownership of the bounds This appears to be a performance no-op on both my Mac and N5. I guess even the simplest indirect branch predictor ("same as last time") can predict the repeated virtual calls to SkBBH::insert() perfectly. BUG=skia: Review URL: https://codereview.chromium.org/670213002
* Print GPU cache stats in nanobench/dm with veryVerboseGravatar bsalomon2014-10-24
| | | | Review URL: https://codereview.chromium.org/680553002
* Revert "Revert of create shaderproc for nofilter-opaque-dx (patchset #7 ↵Gravatar mtklein2014-10-23
| | | | | | | | | | id:120001 of https://codereview.chromium.org/664783004/)" This reverts commit 430b795cc8a1cdbddd8fdc5511a3a523348937f7 and adds suppressions. BUG=skia: Review URL: https://codereview.chromium.org/673023002
* Revert of create shaderproc for nofilter-opaque-dx (patchset #7 id:120001 of ↵Gravatar mtklein2014-10-23
| | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/664783004/) Reason for revert: Many GMs fixed. Needs rebaseline, perhaps layout test rebaselines. Original issue's description: > create shaderproc for nofilter-opaque-dx > > > speedup nofilter > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/a40a276bcee2246439dcf816273c1307f5c3c69f TBR=djsollen@google.com,reed@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/656913005
* create shaderproc for nofilter-opaque-dxGravatar reed2014-10-23
| | | | | | | | speedup nofilter BUG=skia: Review URL: https://codereview.chromium.org/664783004
* Qualify the return value of SkImageDecoder::decodeGravatar scroggo2014-10-22
| | | | | | | | | | | | | | | | | | | | | | | Add a new enum to differentiate between a complete decode and a partial decode (with the third value being failure). Return this value from SkImageDecoder::onDecode (in all subclasses, plus SkImageDecoder_empty) and ::decode. For convenience, if the enum is treated as a boolean, success and partial success are both considered true. Note that the static helper functions (DecodeFile etc) still return true and false (for one thing, this allows us to continue to use SkImageDecoder::DecodeMemory as an SkPicture::InstallPixelRefProc in SkPicture::CreateFromStream). Also correctly report failure in SkASTCImageDecoder::onDecode when SkTextureCompressor::DecompressBufferFromFormat fails. BUG=skia:3037 BUG:b/17419670 Review URL: https://codereview.chromium.org/647023006
* SkResourceCache::Key namespace support.Gravatar fmalita2014-10-22
| | | | | | | | | | | | Add a unique-per-subclass namespace tag to make Keys from different domains comparable. Also drop the SkPictureShader cache and convert to using the global resource cache instead. R=reed@google.com,mtklein@google.com,robertphillips@google.com Review URL: https://codereview.chromium.org/668223002
* Draw SKPs in 256x256 tiles in nanobench.Gravatar mtklein2014-10-21
| | | | | | | | (This CL will certainly trigger performance regression alerts. Tiled drawing is slower than non-tiled drawing.) BUG=skia: Review URL: https://codereview.chromium.org/669983002
* Revert of Start to vectorize SkTileGrid. (patchset #48 id:1670001 of ↵Gravatar mtklein2014-10-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/634543004/) Reason for revert: breaks chrome GPU debug bots Original issue's description: > Start to vectorize SkTileGrid. > > This adds Sk4x.h to help. > > BUG=skia:3041 > > Committed: https://skia.googlesource.com/skia/+/90c7992bfc6330f070f7704d63372a0ec8410170 > > CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu12-ShuttleA-GTX660-x86-Debug-Trybot > > Committed: https://skia.googlesource.com/skia/+/958e9628d5f9a81aeafa78572cb4afc4b19a455a TBR=reed@google.com,mtklein@chromium.org NOTREECHECKS=true NOTRY=true BUG=skia:3041 Review URL: https://codereview.chromium.org/637863005
* Start to vectorize SkTileGrid.Gravatar mtklein2014-10-20
| | | | | | | | | | | | This adds Sk4x.h to help. BUG=skia: Committed: https://skia.googlesource.com/skia/+/90c7992bfc6330f070f7704d63372a0ec8410170 CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu12-ShuttleA-GTX660-x86-Debug-Trybot Review URL: https://codereview.chromium.org/634543004
* Revert of Start to vectorize SkTileGrid. (patchset #45 id:1430002 of ↵Gravatar mtklein2014-10-16
| | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/634543004/) Reason for revert: Many GCC bots missing __builtin_shuffle, e.g. Test-Ubuntu12-ShuttleA-GTX660-x86-Debug-Trybot. Original issue's description: > Start to vectorize SkTileGrid. > > This adds Sk4x.h to help. > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/90c7992bfc6330f070f7704d63372a0ec8410170 TBR=reed@google.com,mtklein@chromium.org NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/663663002
* Start to vectorize SkTileGrid.Gravatar mtklein2014-10-16
| | | | | | | | This adds Sk4x.h to help. BUG=skia: Review URL: https://codereview.chromium.org/634543004
* nanobench: flush after recording every Nth data point.Gravatar mtklein2014-10-14
| | | | | | | | | | Got to keep our precious data in event of a crash. With --flushEvery 10 I'm not seeing this cost any wall time. BUG=skia: Review URL: https://codereview.chromium.org/653083003
* detect --loops is < 0 and interpret that as running forever (mostly)Gravatar reed2014-10-10
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/643143002
* faster SkRect::sortGravatar reed2014-10-10
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/646863002
* cleanup and optimize rect intersect routinesGravatar reed2014-10-09
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/640723004
* Attempt at fixing color cube benchGravatar sugoi2014-10-09
| | | | | | | | The original bench was hitting the cache since it was using the same color filter for all loops. By creating a new color filter within the loop, at least this part of it is solved. I'm not 100% sure this is the right way, but at least the numbers are a bit more reasonable and are affected by the output resolution. BUG=skia: Review URL: https://codereview.chromium.org/648483002
* Use presence of a content key as non-scratch indicatorGravatar bsalomon2014-10-09
| | | | | | | | BUG=skia:2889 Committed: https://skia.googlesource.com/skia/+/9eefe0851eeaa8ded05b4774ebcb38ed201d5dbf Review URL: https://codereview.chromium.org/639873002
* Draw more accurate thick-stroked Beziers (disabled)Gravatar caryclark2014-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Adding 3D lut color filterGravatar sugoi2014-10-09
| | | | | | | | Included in this cl is support for 3D textures. BUG=skia: Review URL: https://codereview.chromium.org/580863004