skia2/bench
Yuqian Li df60e369a8 New analytic AA scan converter using delta (I call it DAA for now)
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>
2017-07-25 21:55:19 +00:00
..
AAClipBench.cpp change SkClipOp to a class enum 2016-12-12 15:38:31 +00:00
AlternatingColorPatternBench.cpp Misc batch->op cleanup Part 1 of 2 2016-12-21 16:45:40 +00:00
AndroidCodecBench.cpp use unique_ptr for codec factories 2017-07-25 15:35:23 +00:00
AndroidCodecBench.h SkTypes.h : move SkAutoMalloc into SkAutoMalloc.h 2017-01-11 18:55:34 +00:00
BenchLogger.cpp Style Change: NULL->nullptr 2015-08-27 07:41:16 -07:00
BenchLogger.h
Benchmark.cpp Remove const from const int loops. 2015-10-01 09:43:39 -07:00
Benchmark.h move SkTRegister.h into tools 2017-01-11 19:53:36 +00:00
BezierBench.cpp chmod -x *.cpp *.h 2016-10-27 16:41:14 +00:00
BigPathBench.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
BitmapBench.cpp remove unneeded code for index8 imagse 2017-07-03 19:07:25 +00:00
BitmapRectBench.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
BitmapRegionDecoderBench.cpp change SkStreams to work with sk_sp<SkData> instead of SkData* 2016-09-12 12:01:44 -07:00
BitmapRegionDecoderBench.h Remove SkAutoTDelete. 2016-11-03 19:03:40 +00:00
BlendmodeBench.cpp update blendmode bench 2017-07-04 16:47:29 +00:00
BlurBench.cpp switch maskfilters to sk_sp 2016-04-04 10:02:58 -07:00
BlurImageFilterBench.cpp Update SkBlurImageFilter to sk_sp 2016-04-04 04:31:25 -07:00
BlurOccludedRRectBench.cpp Implement GPU occluded blur mask filter 2016-08-10 16:25:25 -07:00
BlurRectBench.cpp Mark overridden destructors with 'override' and remove 'virtual' 2017-03-22 16:06:18 +00:00
BlurRectsBench.cpp switch maskfilters to sk_sp 2016-04-04 10:02:58 -07:00
BlurRoundRectBench.cpp Revert "Revert "make it illegal to include SkXfermode.h"" 2016-11-23 22:17:17 +00:00
ChartBench.cpp hide trivial helpers on canvas 2017-02-22 19:41:04 +00:00
check_bench_regressions.py
ChecksumBench.cpp Use sse4.2 CRC32 instructions to hash when available. 2016-08-08 09:06:28 -07:00
ChromeBench.cpp change clip-bounds getters to always return the rect 2017-01-23 17:14:53 +00:00
ClipMaskBench.cpp Reland "Add a clip mask bench" 2017-05-02 15:33:06 +00:00
CmapBench.cpp Move SkTypeface to sk_sp. 2016-05-12 10:09:31 -07:00
CodecBench.cpp use unique_ptr for codec factories 2017-07-25 15:35:23 +00:00
CodecBench.h SkTypes.h : move SkAutoMalloc into SkAutoMalloc.h 2017-01-11 18:55:34 +00:00
CodecBenchPriv.h remove references to kIndex_8_SkColorType from our tools/tests 2017-07-12 20:25:44 +00:00
ColorCanvasDrawBitmapBench.cpp Revert "Revert "Reland: Remove SkLights include from SkCanvas.h"" 2017-05-03 19:17:11 +00:00
ColorCodecBench.cpp use unique_ptr for codec factories 2017-07-25 15:35:23 +00:00
ColorCodecBench.h SkTypes.h : move SkAutoMalloc into SkAutoMalloc.h 2017-01-11 18:55:34 +00:00
ColorFilterBench.cpp stop using SkScalarMul 2017-02-14 19:45:24 +00:00
ColorPrivBench.cpp Remove const from const int loops. 2015-10-01 09:43:39 -07:00
ControlBench.cpp Remove const from const int loops. 2015-10-01 09:43:39 -07:00
CoverageBench.cpp Attempt 3: SkRasterPipelineBlitter: support A8 2017-01-13 13:25:28 +00:00
CubicKLMBench.cpp Improve cubic KLM accuracy 2017-06-09 17:13:54 +00:00
DashBench.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
DisplacementBench.cpp add drawString helper to canvas 2017-04-28 20:41:04 +00:00
DrawBitmapAABench.cpp Revert "Revert "Reland: Remove SkLights include from SkCanvas.h"" 2017-05-03 19:17:11 +00:00
DrawLatticeBench.cpp Revert "Revert "Reland: Remove SkLights include from SkCanvas.h"" 2017-05-03 19:17:11 +00:00
EncoderBench.cpp Image Encoder: more benches 2017-06-17 22:45:33 +00:00
FontCacheBench.cpp Remove const from const int loops. 2015-10-01 09:43:39 -07:00
FontScalerBench.cpp add drawString helper to canvas 2017-04-28 20:41:04 +00:00
FSRectBench.cpp stop using SkScalarMul 2017-02-14 19:45:24 +00:00
GameBench.cpp hide lockpixels api behind flag 2017-04-17 15:33:36 +00:00
GeometryBench.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
GLBench.cpp skslc can now be compiled with no Skia dependencies, in preparation for its eventual 2017-03-31 18:49:51 +00:00
GLBench.h Turned on SkSL->GLSL compiler 2016-10-12 06:39:56 -07:00
GLInstancedArraysBench.cpp Allow FPs to elevate default precision for the entire fragment program 2017-04-05 14:00:50 +00:00
GLVec4ScalarBench.cpp Allow FPs to elevate default precision for the entire fragment program 2017-04-05 14:00:50 +00:00
GLVertexAttributesBench.cpp Allow FPs to elevate default precision for the entire fragment program 2017-04-05 14:00:50 +00:00
GMBench.cpp Run GM benchs in bench mode 2016-05-16 09:09:18 -07:00
GMBench.h Mark overridden destructors with 'override' and remove 'virtual' 2017-03-22 16:06:18 +00:00
GradientBench.cpp Remove SkLinearGradient::kForce4fContext_PrivateFlag 2017-06-07 20:24:51 +00:00
GrMemoryPoolBench.cpp Remove SkAutoTDelete. 2016-11-03 19:03:40 +00:00
GrMipMapBench.cpp Add mock config to tools and run through gms and benchs without crashing. 2017-07-07 20:47:38 +00:00
GrResourceCacheBench.cpp Add Make[backend] calls for creating GrContexts 2017-07-25 14:33:03 +00:00
gUniqueGlyphIDs.h Make header files self-sufficient 2017-02-10 01:19:52 +00:00
HairlinePathBench.cpp Remove const from const int loops. 2015-10-01 09:43:39 -07:00
HardStopGradientBench_ScaleNumColors.cpp Add HardStopGradientBench_ScaleNumHardStops.cpp 2016-07-28 10:59:49 -07:00
HardStopGradientBench_ScaleNumHardStops.cpp Add HardStopGradientBench_ScaleNumHardStops.cpp 2016-07-28 10:59:49 -07:00
HardStopGradientBench_SpecialHardStops.cpp Add new benchmark for testing special hard stop gradient cases 2016-08-03 12:12:19 -07:00
ImageBench.cpp Fix native_image_to_raster_surface crash in ANGLE msaa configs 2017-06-08 15:37:40 +00:00
ImageCacheBench.cpp Remove const from const int loops. 2015-10-01 09:43:39 -07:00
ImageCacheBudgetBench.cpp Remove SkAutoTDeleteArray 2016-11-02 21:30:38 +00:00
ImageFilterCollapse.cpp stop using SkScalarMul 2017-02-14 19:45:24 +00:00
ImageFilterDAGBench.cpp remove unused mode parameter from SkMergeImageFilter 2017-06-19 14:01:56 +00:00
InterpBench.cpp Reverse dependency between SkScalar.h and SkFixed.h. 2016-04-07 08:49:31 -07:00
LightingBench.cpp stop using SkScalarMul 2017-02-14 19:45:24 +00:00
LineBench.cpp Revert of Modify LineBench for drawing straight line (patchset #3 id:40001 of https://codereview.chromium.org/1936153002/ ) 2016-05-05 14:02:36 -07:00
MagnifierBench.cpp Revert "Revert "Reland: Remove SkLights include from SkCanvas.h"" 2017-05-03 19:17:11 +00:00
MathBench.cpp *SkTCast<int*>(float*) -> memcpy 2016-09-29 15:48:04 +00:00
Matrix44Bench.cpp Remove const from const int loops. 2015-10-01 09:43:39 -07:00
MatrixBench.cpp Revert of Change mapRectScaleTranslate to pass args/ret by value (patchset #2 id:20001 of https://codereview.chromium.org/2138943002/ ) 2016-08-10 07:13:21 -07:00
MatrixConvolutionBench.cpp distinguish distinct matrixconvolution benchmarks 2016-04-12 15:52:52 -07:00
MeasureBench.cpp Add time return argument to SkCurveMeasure's getPosTan, rename to getPosTanTime 2016-08-10 07:45:31 -07:00
MemsetBench.cpp Remove const from const int loops. 2015-10-01 09:43:39 -07:00
MergeBench.cpp remove unused mode parameter from SkMergeImageFilter 2017-06-19 14:01:56 +00:00
microbench.json Fix the other microbench schema 2014-07-25 08:30:11 -07:00
MipMapBench.cpp Reland: Finish up mip opts: 2x3 and 3x2 2017-04-11 17:20:24 +00:00
MorphologyBench.cpp Update SkMorphology ImageFilters to sk_sp 2016-04-05 09:09:37 -07:00
MutexBench.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
nanobench.cpp New analytic AA scan converter using delta (I call it DAA for now) 2017-07-25 21:55:19 +00:00
nanobench.h Rename GrContextFactory::ContextOptions to ContextOverrides 2017-02-21 21:45:45 +00:00
pack_int_uint16_t_Bench.cpp Add a bench to measure the best way to pack from int to uint16_t with SSE. 2016-07-15 07:45:53 -07:00
PatchBench.cpp color-correct patch 2017-05-23 15:44:46 +00:00
PathBench.cpp We should draw at least once for benchmark 2017-07-04 21:03:21 +00:00
PathIterBench.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
PathTextBench.cpp Add a nanobench for drawing glyphs as paths 2017-07-05 15:38:22 +00:00
PDFBench.cpp have resources return unique_ptr for stream 2017-07-23 18:24:24 +00:00
PerlinNoiseBench.cpp Hide SkPerlinNoiseShader impl details 2017-05-18 17:24:39 +00:00
PictureNestingBench.cpp return pictures as sk_sp 2016-03-18 07:25:55 -07:00
PictureOverheadBench.cpp bench clip overhead during recording 2017-03-06 21:45:02 +00:00
PicturePlaybackBench.cpp Remove SkAutoTDelete. 2016-11-03 19:03:40 +00:00
PremulAndUnpremulAlphaOpsBench.cpp Rename SkConfig8888/SkPixelInfo to SkConvertPixels 2017-02-15 13:50:55 +00:00
QuickRejectBench.cpp Optimized implementation of quickReject() 2016-08-12 08:29:08 -07:00
ReadPixBench.cpp Revert "Revert "Reland: Remove SkLights include from SkCanvas.h"" 2017-05-03 19:17:11 +00:00
RecordingBench.cpp Remove SkLiteDL::makeThreadsafe(). 2017-03-02 21:07:42 +00:00
RecordingBench.h Refactor SkLiteDL to no longer extend SkDrawable. 2017-03-02 20:16:17 +00:00
RectanizerBench.cpp Remove SkAutoTDelete. 2016-11-03 19:03:40 +00:00
RectBench.cpp Fix Memcheck:Overlap in setting up rect bench names 2017-03-01 15:22:42 +00:00
RectoriBench.cpp remove unused code around SK_SUPPORT_LEGACY_XFERMODE_PARAM 2016-11-03 19:54:08 +00:00
RefCntBench.cpp Clean up some unused atomic routines. 2016-07-27 08:40:45 -07:00
RegionBench.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
RegionContainBench.cpp Remove const from const int loops. 2015-10-01 09:43:39 -07:00
RepeatTileBench.cpp remove unneeded code for index8 imagse 2017-07-03 19:07:25 +00:00
ResultsWriter.h Mark overridden destructors with 'override' and remove 'virtual' 2017-03-22 16:06:18 +00:00
RotatedRectBench.cpp make SkXfermode.h go away 2016-11-16 15:38:11 +00:00
RTreeBench.cpp Remove const from const int loops. 2015-10-01 09:43:39 -07:00
ScalarBench.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
ShaderMaskBench.cpp Revert "Revert "Reland: Remove SkLights include from SkCanvas.h"" 2017-05-03 19:17:11 +00:00
ShadowBench.cpp Add microbench for shadows 2017-05-18 18:57:24 +00:00
ShapesBench.cpp Begin instanced rendering for simple shapes 2016-07-07 08:49:11 -07:00
Sk4fBench.cpp Sk4f: add floor() 2016-02-09 15:41:36 -08:00
SkGlyphCacheBench.cpp SkTypeface::MakeFromName to take SkFontStyle. 2016-05-31 11:42:37 -07:00
SKPAnimationBench.cpp change clip-bounds getters to always return the rect 2017-01-23 17:14:53 +00:00
SKPAnimationBench.h bench, samples, etc: s/SkAutoTUnref/sk_sp/ 2016-11-07 15:17:32 +00:00
SKPBench.cpp change clip-bounds getters to always return the rect 2017-01-23 17:14:53 +00:00
SKPBench.h bench, samples, etc: s/SkAutoTUnref/sk_sp/ 2016-11-07 15:17:32 +00:00
skpbench.json Fix scale type in JSON format 2014-06-26 15:39:31 -07:00
SkRasterPipelineBench.cpp convert over to 2d-mode 2017-07-20 19:50:32 +00:00
SortBench.cpp Remove const from const int loops. 2015-10-01 09:43:39 -07:00
StreamBench.cpp speedup dynamicwstream 2016-12-15 19:49:31 +00:00
StrokeBench.cpp Remove const from const int loops. 2015-10-01 09:43:39 -07:00
SwizzleBench.cpp Optimize CMYK->RGBA (BGRA) transform for jpeg decodes 2016-02-08 13:26:25 -08:00
TableBench.cpp Remove const from const int loops. 2015-10-01 09:43:39 -07:00
TextBench.cpp add drawString helper to canvas 2017-04-28 20:41:04 +00:00
TextBlobBench.cpp Use sk_sp text blob APIs 2016-09-13 10:00:23 -07:00
TileBench.cpp hide lockpixels api behind flag 2017-04-17 15:33:36 +00:00
TileImageFilterBench.cpp Update TileImageFilter to sk_sp 2016-04-15 07:57:40 -07:00
TopoSortBench.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00
VertBench.cpp move vertex-mode enum into SkVertices 2017-04-03 15:50:16 +00:00
WritePixelsBench.cpp Revert "Revert "Reland: Remove SkLights include from SkCanvas.h"" 2017-05-03 19:17:11 +00:00
WriterBench.cpp Style bikeshed - remove extraneous whitespace 2016-03-29 09:03:53 -07:00