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

Issue 6863053: add getTypes() to SkMatrix44, to cache how complex the matrix is. (Closed)

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

Description

add getTypes() to SkMatrix44, to cache how complex the matrix is. add bench optimize operator== by performing 4 compares in a row before checking optimize setconcat by noting when we can write the answer directly into this At least on this macbook, I had to mark helpers like isIdentity() as inline to get them inlined. Committed: https://code.google.com/p/skia/source/detail?r=6655

Patch Set 1 #

Total comments: 9

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+451 lines, -94 lines) Patch
A bench/Matrix44Bench.cpp View 1 1 chunk +140 lines, -0 lines 0 comments Download
M gyp/bench.gypi View 1 1 chunk +1 line, -0 lines 0 comments Download
M include/core/SkPostConfig.h View 1 1 chunk +3 lines, -1 line 0 comments Download
M include/utils/SkMatrix44.h View 1 12 chunks +120 lines, -27 lines 0 comments Download
M src/utils/SkMatrix44.cpp View 1 17 chunks +145 lines, -47 lines 0 comments Download
M tests/Matrix44Test.cpp View 1 6 chunks +42 lines, -19 lines 0 comments Download

Messages

Total messages: 5
reed1
12 years ago (2012-12-03 19:18:27 UTC) #1
reed1
12 years ago (2012-12-03 19:18:50 UTC) #2
bsalomon
Really weird that you needed to explicitly say inline. Maybe that warrants some more investigation. ...
12 years ago (2012-12-03 19:33:30 UTC) #3
reed1
https://codereview.appspot.com/6863053/diff/1/bench/Matrix44Bench.cpp File bench/Matrix44Bench.cpp (right): https://codereview.appspot.com/6863053/diff/1/bench/Matrix44Bench.cpp#newcode66 bench/Matrix44Bench.cpp:66: // always_do(m0 == m1); On 2012/12/03 19:33:30, bsalomon wrote: ...
12 years ago (2012-12-03 20:39:54 UTC) #4
bsalomon
12 years ago (2012-12-03 21:02:57 UTC) #5
On 2012/12/03 20:39:54, reed1 wrote:
> https://codereview.appspot.com/6863053/diff/1/bench/Matrix44Bench.cpp
> File bench/Matrix44Bench.cpp (right):
> 
>
https://codereview.appspot.com/6863053/diff/1/bench/Matrix44Bench.cpp#newcode66
> bench/Matrix44Bench.cpp:66: //            always_do(m0 == m1);
> On 2012/12/03 19:33:30, bsalomon wrote:
> > not needed?
> 
> Done.
> 
> https://codereview.appspot.com/6863053/diff/1/include/utils/SkMatrix44.h
> File include/utils/SkMatrix44.h (right):
> 
>
https://codereview.appspot.com/6863053/diff/1/include/utils/SkMatrix44.h#newc...
> include/utils/SkMatrix44.h:106: SkMatrix44() { this->setIdentity(); }
> On 2012/12/03 19:33:30, bsalomon wrote:
> > This is different than SkMatrix. 
> 
> Yes, though this is not new with this CL. I just inlined what it was doing.
> 
> I think a separate thread should be started to get rid of this...
> 
>
https://codereview.appspot.com/6863053/diff/1/include/utils/SkMatrix44.h#newc...
> include/utils/SkMatrix44.h:157: void setIdentity();
> On 2012/12/03 19:33:30, bsalomon wrote:
> > Should we add setIdentity() to SkMatrix for parity? Why have both reset and
> > setIdentity()?
> 
> I didn't add that either. But sure, we can add it to SkMatrix.h as well. I
like
> reset() since it follows lots of other skia classes, but having a
> domain-specific one seems ok too.
> 
> https://codereview.appspot.com/6863053/diff/1/src/utils/SkMatrix44.cpp
> File src/utils/SkMatrix44.cpp (right):
> 
>
https://codereview.appspot.com/6863053/diff/1/src/utils/SkMatrix44.cpp#newcode74
> src/utils/SkMatrix44.cpp:74: if (1 != scaleX() || 1 != scaleY() || 1 !=
> scaleX()) {
> On 2012/12/03 19:33:30, bsalomon wrote:
> > last one should be scaleZ()
> 
> Oops, good catch.
> 
> > 
> > "this->"?
> 
> Yea, I was trying to not line-break

lgtm
Sign in to reply to this message.

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