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

Issue 1695051: Added optional "ambiguous" outgoing argument to XRay queries so that... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 12 months ago by kbr1
Modified:
13 years, 12 months ago
Reviewers:
Stephen White
CC:
skia-review_googlegroups.com
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Added optional "ambiguous" outgoing argument to XRay queries so that calling code may choose different y-coordinates for better robustness. Tested and verified manually inside O3D. BUG=none TEST=none Committed: https://code.google.com/p/skia/source/detail?r=586

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+77 lines, -14 lines) Patch
M include/core/SkGeometry.h View 3 chunks +16 lines, -5 lines 0 comments Download
M src/core/SkGeometry.cpp View 6 chunks +61 lines, -9 lines 3 comments Download

Messages

Total messages: 4
kbr1
Please review. Thanks.
13 years, 12 months ago (2010-07-07 18:24:22 UTC) #1
Stephen White
I'm not sure enough about this code to change its behaviour in the absence of ...
13 years, 12 months ago (2010-07-07 18:32:21 UTC) #2
kbr1
http://codereview.appspot.com/1695051/diff/1/3 File src/core/SkGeometry.cpp (right): http://codereview.appspot.com/1695051/diff/1/3#newcode64 src/core/SkGeometry.cpp:64: } On 2010/07/07 18:32:21, Stephen White wrote: > Hmm. ...
13 years, 12 months ago (2010-07-07 20:02:08 UTC) #3
Stephen White
13 years, 12 months ago (2010-07-07 20:42:43 UTC) #4
LGTM.

http://codereview.appspot.com/1695051/diff/1/3
File src/core/SkGeometry.cpp (right):

http://codereview.appspot.com/1695051/diff/1/3#newcode64
src/core/SkGeometry.cpp:64: }
On 2010/07/07 20:02:08, kbr1 wrote:
> On 2010/07/07 18:32:21, Stephen White wrote:
> > Hmm.  This looks like it will return different values than it did before,
even
> > without the ambiguity parameter.  You're also using equality of floating
point
> > values, which can be problematic.  Are you sure this is correct?
> 
> It should return the same result as before. The only difference is that the
new
> code explicitly checks the incoming Y against the second endpoint of the line,
> in order to see whether the result is ambiguous. This case was previously
> handled by the full line segment evaluation.

OK, I see that now.

> Using equality of floating point values is sufficient for the cases I've
tested
> this code with. We can change the implementation without changing the
interface
> in the future if it turns out this is inadequate.
> 

OK, LGTM.
Sign in to reply to this message.

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