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

Issue 5999050: add isSimilarityTransform() and some tests (Closed)

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

Description

add isSimilarityTransform() and some tests As discussed, this function is separated from the big CL (circle drawing: http://codereview.appspot.com/5696086/). The tests are run successfully both in SK_SCALAR_IS_FLOAT and SK_SCALAR_IS_FIXED configuration. BUG= TEST=

Patch Set 1 #

Total comments: 3

Patch Set 2 : don't add interface in SkMatrix, but use a static function in SkGpuDevice.cpp #

Patch Set 3 : go back to tol. #

Patch Set 4 : remove the SkGpuDevice.cpp, it'll be added in circle drawing patch. #

Patch Set 5 : add tol^2 #

Patch Set 6 : relax the tolerance for SK_SCALAR_IS_FIXED #

Patch Set 7 : one comparison use tol while another use tol^2 #

Patch Set 8 : cast to float and then calculate #

Patch Set 9 : bypass some tests for fixed build #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+160 lines, -0 lines) Patch
M tests/MatrixTest.cpp View 1 2 3 4 5 6 7 8 2 chunks +160 lines, -0 lines 2 comments Download

Messages

Total messages: 20
guanqun
1. Use Brian's algorithm to save a few operations when setting up 'vec'. 2. Add ...
12 years, 1 month ago (2012-04-11 06:20:58 UTC) #1
reed1
http://codereview.appspot.com/5999050/diff/1/include/core/SkMatrix.h File include/core/SkMatrix.h (right): http://codereview.appspot.com/5999050/diff/1/include/core/SkMatrix.h#newcode89 include/core/SkMatrix.h:89: * if the matrix doesn't have skew and it ...
12 years, 1 month ago (2012-04-11 13:00:38 UTC) #2
bsalomon
http://codereview.appspot.com/5999050/diff/1/src/core/SkMatrix.cpp File src/core/SkMatrix.cpp (right): http://codereview.appspot.com/5999050/diff/1/src/core/SkMatrix.cpp#newcode1154 src/core/SkMatrix.cpp:1154: On 2012/04/11 13:00:38, reed1 wrote: > Do we want ...
12 years, 1 month ago (2012-04-11 13:35:01 UTC) #3
guanqun
I'm removing the interface in SkMatrix, because as we don't track rotated circles, it's used ...
12 years, 1 month ago (2012-04-12 06:52:44 UTC) #4
reed1
I think that "< is faster than <=" is dumb. I've changed it to <= ...
12 years, 1 month ago (2012-04-12 12:52:21 UTC) #5
guanqun
On 2012/04/12 12:52:21, reed1 wrote: > I think that "< is faster than <=" is ...
12 years, 1 month ago (2012-04-13 01:13:38 UTC) #6
reed1
I wonder if there is a way to use tables of data to reduce the ...
12 years, 1 month ago (2012-04-13 12:14:28 UTC) #7
guanqun
On 2012/04/13 12:14:28, reed1 wrote: > I wonder if there is a way to use ...
12 years, 1 month ago (2012-04-14 13:13:07 UTC) #8
bsalomon
On 2012/04/14 13:13:07, guanqun wrote: > On 2012/04/13 12:14:28, reed1 wrote: > > I wonder ...
12 years, 1 month ago (2012-04-16 14:07:05 UTC) #9
bsalomon
On 2012/04/16 14:07:05, bsalomon wrote: > On 2012/04/14 13:13:07, guanqun wrote: > > On 2012/04/13 ...
12 years, 1 month ago (2012-04-16 14:41:17 UTC) #10
guanqun.lu_gmail.com
oops, which platform is seeing this failure? I've tested it with fixed point on x86_64 ...
12 years, 1 month ago (2012-04-16 15:39:54 UTC) #11
bsalomon
Actually looking back on the bot runs it appears to only have failed on the ...
12 years, 1 month ago (2012-04-16 15:52:08 UTC) #12
guanqun
Tolerance is too tight for fixed build. So relax it. I've tested it on an ...
12 years, 1 month ago (2012-04-17 01:32:56 UTC) #13
reed1
1/64 is a pretty loose tolerance. Do we need to look at how we compute ...
12 years, 1 month ago (2012-04-17 12:31:06 UTC) #14
guanqun
In the latest patchset, I propose to casting SkScalar to float and do the calculation. ...
12 years, 1 month ago (2012-04-18 05:02:45 UTC) #15
reed1
I think the use of the tolerance parameter in the function is incorrect, but I ...
12 years, 1 month ago (2012-04-20 20:46:46 UTC) #16
guanqun
Hi Mike, In latest patchset, I bypass the failed tests on Mac platform and added ...
12 years, 1 month ago (2012-04-24 02:23:54 UTC) #17
reed1
lgtm, w/ a question about the test for 4 zeros in the middle of the ...
12 years, 1 month ago (2012-04-24 16:10:30 UTC) #18
guanqun
Question answered. And please help land this CL if it's OK. http://codereview.appspot.com/5999050/diff/28001/tests/MatrixTest.cpp File tests/MatrixTest.cpp (right): ...
12 years ago (2012-04-25 07:53:39 UTC) #19
bsalomon
12 years ago (2012-04-25 15:16:34 UTC) #20
On 2012/04/25 07:53:39, guanqun wrote:
> Question answered. And please help land this CL if it's OK.
> 
> http://codereview.appspot.com/5999050/diff/28001/tests/MatrixTest.cpp
> File tests/MatrixTest.cpp (right):
> 
>
http://codereview.appspot.com/5999050/diff/28001/tests/MatrixTest.cpp#newcode206
> tests/MatrixTest.cpp:206: 
> On 2012/04/24 16:10:30, reed1 wrote:
> > What does this test do that isn't done by the tests below?
> 
> No. The tests below would return true when all numbers are zero, which should
> return false. So we have to check it explicitly.

Landed at r3762
Sign in to reply to this message.

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