DescriptionWithout any dashing "optimization"
drawpointsdash_5_5_aa 8888: msecs = 24.43 GPU: msecs = 36.71
drawpointsdash_5_5_bw 8888: msecs = 11.05 GPU: msecs = 14.67
drawpointsdash_3_1_aa 8888: msecs = 15.96 GPU: msecs = 31.00
drawpointsdash_3_1_bw 8888: msecs = 12.85 GPU: msecs = 20.44
drawpointsdash_1_1_aa 8888: msecs = 38.58 GPU: msecs = 61.46
drawpointsdash_1_1_bw 8888: msecs = 34.65 GPU: msecs = 44.79
With 1on/1off "optimization"
drawpointsdash_5_5_aa 8888: msecs = 25.49 GPU: msecs = 37.12
drawpointsdash_5_5_bw 8888: msecs = 11.73 GPU: msecs = 15.68
drawpointsdash_3_1_aa 8888: msecs = 16.36 GPU: msecs = 30.89
drawpointsdash_3_1_bw 8888: msecs = 13.87 GPU: msecs = 21.37
drawpointsdash_1_1_aa 8888: msecs = 8.70 GPU: msecs = 158.68
drawpointsdash_1_1_bw 8888: msecs = 3.56 GPU: msecs = 50.64
With 3on/3off optimization:
drawpointsdash_5_5_aa 8888: msecs = 4.76 GPU: msecs = 32.71
drawpointsdash_5_5_bw 8888: msecs = 2.63 GPU: msecs = 11.21
drawpointsdash_3_1_aa 8888: msecs = 13.28 GPU: msecs = 53.65
drawpointsdash_3_1_bw 8888: msecs = 11.18 GPU: msecs = 17.73
drawpointsdash_1_1_aa 8888: msecs = 8.63 GPU: msecs = 158.20
drawpointsdash_1_1_bw 8888: msecs = 3.43 GPU: msecs = 49.58
So ... the GPU still takes a big hit in the AA cases but is actually okay in the 5x5 case. Raster sees some improvement in the 3x1 case but not as extravagant as in the 5x5 and 1x1 cases. (Note: the addition of the 3x1 logic hasn't impacted the 1x1's performance).
Looking more closely at the 3x1 case, if we draw wrong and call drawPoints instead of expanding the 3x1s into rects (in SkDraw::drawPoints) we get:
drawpointsdash_5_5_aa 8888: msecs = 4.77 GPU: msecs = 33.34
drawpointsdash_5_5_bw 8888: msecs = 2.50 GPU: msecs = 11.21
drawpointsdash_3_1_aa 8888: msecs = 3.59 GPU: msecs = 54.50
drawpointsdash_3_1_bw 8888: msecs = 1.95 GPU: msecs = 17.74
drawpointsdash_1_1_aa 8888: msecs = 8.90 GPU: msecs = 161.27
drawpointsdash_1_1_bw 8888: msecs = 3.43 GPU: msecs = 50.05
So there is something magic about drawing squares.
Top 10 for 1_1_aa:
Running Time Self Symbol Name
922.0ms 36.7% 922.0 SkARGB32_Blitter::blitV(int, int, int, unsigned char)
481.0ms 19.1% 481.0 do_scanline(int, int, int, unsigned int, SkBlitter*)
250.0ms 9.9% 250.0 aa_square_proc(PtProcRec const&, SkPoint const*, int, SkBlitter*)
243.0ms 9.6% 243.0 SkScan::AntiFillXRect(SkIRect const&, SkRegion const*, SkBlitter*)
217.0ms 8.6% 217.0 antifilldot8(int, int, int, int, SkBlitter*, bool)
104.0ms 4.1% 104.0 SkScan::AntiFillXRect(SkIRect const&, SkRasterClip const&, SkBlitter*)
56.0ms 2.2% 56.0 SkDashPathEffect::asPoints(SkPathEffect::PointData*, SkPath const&, SkStrokeRec const&, SkMatrix const&) const
51.0ms 2.0% 51.0 memmove$VARIANT$sse42
17.0ms 0.6% 17.0 SkDraw::drawPoints(SkCanvas::PointMode, unsigned long, SkPoint const*, SkPaint const&, bool) const
9.0ms 0.3% 9.0 szone_size
Top 10 for 3_1_aa:
Running Time Self Symbol Name
319.0ms 14.1% 319.0 SkARGB32_Black_Blitter::blitAntiH(int, int, unsigned char const*, short const*)
251.0ms 11.1% 251.0 SkScan::AntiFillRect(SkRect const&, SkRegion const*, SkBlitter*)
247.0ms 10.9% 247.0 SkDraw::drawRect(SkRect const&, SkPaint const&) const
228.0ms 10.1% 228.0 do_scanline(int, int, int, unsigned int, SkBlitter*)
137.0ms 6.0% 137.0 SkBlitter::Choose(SkBitmap const&, SkMatrix const&, SkPaint const&, void*, unsigned long)
79.0ms 3.5% 79.0 floorf
77.0ms 3.4% 77.0 antifilldot8(int, int, int, int, SkBlitter*, bool)
74.0ms 3.2% 74.0 ceilf
74.0ms 3.2% 74.0 SkARGB32_Blitter::SkARGB32_Blitter(SkBitmap const&, SkPaint const&)
64.0ms 2.8% 64.0 SkMatrix::mapPoints(SkPoint*, SkPoint const*, int) const
Patch Set 1 #Patch Set 2 : Refactored #Patch Set 3 : svn update #Patch Set 4 : now call drawPoints instead of expanding rects #Patch Set 5 : improve length measurement #Patch Set 6 : Minor cleanup #Patch Set 7 : Alter API to return first & last paths rather than sizes #
MessagesTotal messages: 10
|