Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3086)

Issue 883047: change the hairline detection threshold to <=1.0 from <1.0

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 2 months ago by anatoly
Modified:
9 years, 3 months ago
Reviewers:
reed, reed1
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Description

The 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. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -6 lines) Patch
bench/RectBench.cpp View 2 chunks +9 lines, -4 lines 0 comments Download
bench/SkBenchmark.h View 2 chunks +15 lines, -1 line 0 comments Download
bench/SkBenchmark.cpp View 1 chunk +1 line, -0 lines 0 comments Download
bench/benchmain.cpp View 1 3 chunks +18 lines, -0 lines 0 comments Download
src/core/SkDraw.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 7
anatoly
14 years, 2 months ago (2010-04-07 15:21:25 UTC) #1
reed1
Is that antialiased? Can you run the bench in both modes, to see both sets ...
14 years, 2 months ago (2010-04-07 15:42:38 UTC) #2
anatoly
This was antialiased. Here's the numbers with -forceAA 0, and -repeat 50 to improve stability: ...
14 years, 2 months ago (2010-04-07 19:23:45 UTC) #3
reed
http://codereview.appspot.com/883047/diff/1/2 File bench/benchmain.cpp (right): http://codereview.appspot.com/883047/diff/1/2#newcode203 bench/benchmain.cpp:203: const char* matchStr = NULL; for clarity in this ...
14 years, 2 months ago (2010-04-08 14:29:22 UTC) #4
anatoly
http://codereview.appspot.com/883047/diff/1/2 File bench/benchmain.cpp (right): http://codereview.appspot.com/883047/diff/1/2#newcode203 bench/benchmain.cpp:203: const char* matchStr = NULL; Done and I'm uploading ...
14 years, 2 months ago (2010-04-08 14:45:09 UTC) #5
anatoly
fix width->strokeWidth etc.
14 years, 2 months ago (2010-04-08 14:45:45 UTC) #6
reed
14 years, 2 months ago (2010-04-09 16:41:19 UTC) #7
LGTM
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b