DescriptionThe actual change is the one-liner in SkDraw.cpp. The rest of the patch is scaffolding to the benchmark to measure the impact. The existing lines bench test used only sizes 7 and 0 and wouldn't be affected by this change. I added -strokeWidth=[float] to benchmain.cpp which overrides the default widths.
The gm suit passes.
Examples of benchmark output AFTER the change:
$ ./out/bench/bench -match lines -repeat 20 -strokeWidth 0
running bench [640 480] lines 8888: msecs = 4.65, fps = 215.05 565: msecs = 3.55, fps = 281.69
$ ./out/bench/bench -match lines -repeat 20 -strokeWidth 0.99
running bench [640 480] lines 8888: msecs = 6.30, fps = 158.73 565: msecs = 3.60, fps = 277.78
$ ./out/bench/bench -match lines -repeat 20 -strokeWidth 1.00
running bench [640 480] lines 8888: msecs = 5.25, fps = 190.48 565: msecs = 3.90, fps = 256.41
$ ./out/bench/bench -match lines -repeat 20 -strokeWidth 1.01
running bench [640 480] lines 8888: msecs = 19.55, fps = 51.15 565: msecs = 17.80, fps = 56.18
$ ./out/bench/bench -match lines -repeat 20 -strokeWidth 7
running bench [640 480] lines 8888: msecs = 24.40, fps = 40.98 565: msecs = 22.10, fps = 45.25
Demonstrating the difference with the benchmark output BEFORE the change to SkDraw.cpp:
$ ./out/bench/bench -match lines -repeat 20 -strokeWidth 0.99
running bench [640 480] lines 8888: msecs = 6.60, fps = 151.52 565: msecs = 3.65, fps = 273.97
$ ./out/bench/bench -match lines -repeat 20 -strokeWidth 1.00
running bench [640 480] lines 8888: msecs = 20.25, fps = 49.38 565: msecs = 18.45, fps = 54.20
$ ./out/bench/bench -match lines -repeat 20 -strokeWidth 1.01
running bench [640 480] lines 8888: msecs = 19.30, fps = 51.81 565: msecs = 17.70, fps = 56.50
Patch Set 1 #
Total comments: 2
Patch Set 2 : fix width->strokeWidth etc. #
MessagesTotal messages: 7
|