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

Issue 5992077: Fix SkPathStroker::lineTo() for line with length SK_ScalarNearlyZero (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 5 months ago by epoger
Modified:
12 years, 5 months ago
Reviewers:
bsalomon, reed1
CC:
skia-review_googlegroups.com, hendriks, justinlin
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Fix SkPathStroker::lineTo() for line with length SK_ScalarNearlyZero Committed: https://code.google.com/p/skia/source/detail?r=3650

Patch Set 1 #

Patch Set 2 : fix tabs #

Patch Set 3 : add missing SkIntToScalar() wrappers #

Total comments: 3

Patch Set 4 : make SkPath::IsLineDegenerate() call CanNormalize() and related changes #

Patch Set 5 : fix tabs #

Total comments: 1

Patch Set 6 : aha, fixed a couple dumb mistakes #

Patch Set 7 : fix >80 char lines #

Patch Set 8 : deprecate old equalsWithinTolerance() method #

Patch Set 9 : make SkPoint::Length() and SkPoint::Normalize() return identical values for FIXED #

Patch Set 10 : rearrange SkPoint.cpp a bit to make diffs less scary #

Total comments: 2

Patch Set 11 : renamed isDistanceSquaredNotNearlyZero as isLengthNearlyZero #

Unified diffs Side-by-side diffs Delta from patch set Stats (+120 lines, -35 lines) Patch
M include/core/SkPath.h View 1 2 3 4 5 6 7 8 3 chunks +6 lines, -6 lines 0 comments Download
M include/core/SkPoint.h View 1 2 3 4 5 6 7 8 1 chunk +22 lines, -4 lines 0 comments Download
M src/core/SkPoint.cpp View 1 2 3 4 5 6 7 8 9 10 3 chunks +69 lines, -25 lines 0 comments Download
M tests/CanvasTest.cpp View 1 2 3 4 5 6 7 8 1 chunk +23 lines, -0 lines 0 comments Download

Messages

Total messages: 22
epoger
The 1-character fix is taken from Erik's https://critique.corp.google.com/#review/29047930 The test was adapted from an email ...
12 years, 5 months ago (2012-04-09 17:41:52 UTC) #1
epoger
Oops, had to add patchset 3 to add some SkIntToScalar() wrappers to the test...
12 years, 5 months ago (2012-04-09 17:51:19 UTC) #2
reed1
https://codereview.appspot.com/5992077/diff/5001/src/core/SkPoint.cpp File src/core/SkPoint.cpp (right): https://codereview.appspot.com/5992077/diff/5001/src/core/SkPoint.cpp#newcode114 src/core/SkPoint.cpp:114: if (mag2 >= SK_ScalarNearlyZero * SK_ScalarNearlyZero) { Can we ...
12 years, 5 months ago (2012-04-09 18:02:42 UTC) #3
reed1
https://codereview.appspot.com/5992077/diff/5001/src/core/SkPoint.cpp File src/core/SkPoint.cpp (right): https://codereview.appspot.com/5992077/diff/5001/src/core/SkPoint.cpp#newcode114 src/core/SkPoint.cpp:114: if (mag2 >= SK_ScalarNearlyZero * SK_ScalarNearlyZero) { My bad ...
12 years, 5 months ago (2012-04-09 18:10:30 UTC) #4
epoger
https://codereview.appspot.com/5992077/diff/5001/src/core/SkPoint.cpp File src/core/SkPoint.cpp (right): https://codereview.appspot.com/5992077/diff/5001/src/core/SkPoint.cpp#newcode114 src/core/SkPoint.cpp:114: if (mag2 >= SK_ScalarNearlyZero * SK_ScalarNearlyZero) { On 2012/04/09 ...
12 years, 5 months ago (2012-04-09 18:28:28 UTC) #5
hendriks
On Mon, Apr 9, 2012 at 11:28 AM, <epoger@google.com> wrote: > > https://codereview.appspot.**com/5992077/diff/5001/src/**core/SkPoint.cpp<https://codereview.appspot.com/5992077/diff/5001/src/core/SkPoint.cpp> > File ...
12 years, 5 months ago (2012-04-09 18:52:15 UTC) #6
reed1
What if we change IsDegenerateLine to perform exactly the test done in setLength i.e. mag2 ...
12 years, 5 months ago (2012-04-09 19:16:57 UTC) #7
epoger
Mike, please see patchset 5... it seems to me like this ought to work, but ...
12 years, 5 months ago (2012-04-10 15:25:26 UTC) #8
epoger
OK, it works now! Mike, please let me know what you think...
12 years, 5 months ago (2012-04-10 15:55:36 UTC) #9
reed1
I like the header changes, but I'm not sure about the rewrite of CanNormalize. Can ...
12 years, 5 months ago (2012-04-10 17:22:10 UTC) #10
epoger
On 2012/04/10 17:22:10, reed1 wrote: > I like the header changes, but I'm not sure ...
12 years, 5 months ago (2012-04-10 19:34:06 UTC) #11
reed1
why yes you may lgtm
12 years, 5 months ago (2012-04-10 20:27:06 UTC) #12
epoger
On 2012/04/10 20:27:06, reed1 wrote: > why yes you may > > lgtm Uh oh, ...
12 years, 5 months ago (2012-04-10 20:32:46 UTC) #13
epoger
Mike/Brian, please see SkPoint.cpp as of patchset 10 : https://codereview.appspot.com/5992077/diff/9005/src/core/SkPoint.cpp (no other files have changed ...
12 years, 5 months ago (2012-04-11 15:39:29 UTC) #14
reed1
lgtm
12 years, 5 months ago (2012-04-11 15:43:12 UTC) #15
reed1
https://codereview.appspot.com/5992077/diff/9005/src/core/SkPoint.cpp File src/core/SkPoint.cpp (right): https://codereview.appspot.com/5992077/diff/9005/src/core/SkPoint.cpp#newcode98 src/core/SkPoint.cpp:98: // in *result. Returns true if the distance is ...
12 years, 5 months ago (2012-04-11 15:52:55 UTC) #16
bsalomon
https://codereview.appspot.com/5992077/diff/9005/src/core/SkPoint.cpp File src/core/SkPoint.cpp (right): https://codereview.appspot.com/5992077/diff/9005/src/core/SkPoint.cpp#newcode99 src/core/SkPoint.cpp:99: static inline bool isDistanceSquaredNotNearlyZero(float dx, float dy, How about ...
12 years, 5 months ago (2012-04-11 15:54:46 UTC) #17
reed1
Hmmm, Now the comment has to read: // Return true if the length is nearly ...
12 years, 5 months ago (2012-04-11 15:57:56 UTC) #18
bsalomon
On 2012/04/11 15:57:56, reed1 wrote: > Hmmm, > > Now the comment has to read: ...
12 years, 5 months ago (2012-04-11 16:30:40 UTC) #19
bsalomon
On 2012/04/11 16:30:40, bsalomon wrote: > On 2012/04/11 15:57:56, reed1 wrote: > > Hmmm, > ...
12 years, 5 months ago (2012-04-11 16:31:12 UTC) #20
epoger
Brian/Mike, please see latest change to function names: https://codereview.appspot.com/5992077/diff2/9005:8009/src/core/SkPoint.cpp Looking for that crucial third LGTM...
12 years, 5 months ago (2012-04-11 16:36:54 UTC) #21
bsalomon
12 years, 5 months ago (2012-04-11 17:39:01 UTC) #22
On 2012/04/11 16:36:54, epoger wrote:
> Brian/Mike, please see latest change to function names:
> https://codereview.appspot.com/5992077/diff2/9005:8009/src/core/SkPoint.cpp
> 
> Looking for that crucial third LGTM...

LGTM
Sign in to reply to this message.

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