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

Issue 6463071: Add fast path in arcTo and addArc for 0==sweep && 0|360==sweepAngle (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 1 month ago by robertphillips
Modified:
12 years, 1 month ago
Reviewers:
bungeman, bsalomon
CC:
skia-review_googlegroups.com
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Description

This appears to be one of the problems affecting http://code.google.com/p/chromium/issues/detail?id=125490. The width & height computations are prone to numerical instability and prevent the circle path from being taken. Here is the speed up on the new Chrome-emulating circle test: bench_compare.py -o w-o-fix.log -n w-fix.log circles GPU c 17.78 16.30 +1.48 +8.3% circles GPU g 16.35 13.07 +3.28 +20.1% This change will require rebaselining of bigmatrix_gpu & bigmatrix_msaa16 both of which use circles.

Patch Set 1 #

Patch Set 2 : Altered approach #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+64 lines, -0 lines) Patch
M bench/PathBench.cpp View 2 chunks +55 lines, -0 lines 0 comments Download
M src/core/SkPath.cpp View 1 1 chunk +9 lines, -0 lines 2 comments Download

Messages

Total messages: 9
robertphillips
12 years, 1 month ago (2012-08-20 13:03:58 UTC) #1
bsalomon
On 2012/08/20 13:03:58, robertphillips wrote: I thought that we would set the path bounds based ...
12 years, 1 month ago (2012-08-20 13:35:58 UTC) #2
bungeman
Not sure if appropriate in this case, but also take a look at src/ports/SkFloatUtils.h if ...
12 years, 1 month ago (2012-08-20 14:19:06 UTC) #3
robertphillips
So ... addOval does stuff the original rect back into the path - but only ...
12 years, 1 month ago (2012-08-20 14:30:24 UTC) #4
bsalomon
The other thing I meant to ask is why don't the x/y extreme control points ...
12 years, 1 month ago (2012-08-20 14:33:15 UTC) #5
robertphillips
The actual oval/circle points don't appear to be at fault. Chrome adds the initial and ...
12 years, 1 month ago (2012-08-20 14:51:45 UTC) #6
robertphillips
Even faster: bench\bench_compare.py -o w-o-fix.log -n w-fix.log circles 8888 c 24.34 22.46 +1.88 +7.7% circles ...
12 years, 1 month ago (2012-08-20 16:36:39 UTC) #7
bsalomon
Great! LGTM. http://codereview.appspot.com/6463071/diff/7002/src/core/SkPath.cpp File src/core/SkPath.cpp (right): http://codereview.appspot.com/6463071/diff/7002/src/core/SkPath.cpp#newcode937 src/core/SkPath.cpp:937: if (0 == sweepAngle && (0 == ...
12 years, 1 month ago (2012-08-20 16:50:44 UTC) #8
robertphillips
12 years, 1 month ago (2012-08-20 17:25:00 UTC) #9
committed as r5190

http://codereview.appspot.com/6463071/diff/7002/src/core/SkPath.cpp
File src/core/SkPath.cpp (right):

http://codereview.appspot.com/6463071/diff/7002/src/core/SkPath.cpp#newcode937
src/core/SkPath.cpp:937: if (0 == sweepAngle && (0 == startAngle || 360 ==
startAngle)) {
On 2012/08/20 16:50:44, bsalomon wrote:
> Probably should be SkIntToScalar(360).

Done.
Sign in to reply to this message.

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