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

Issue 6380043: SkMatrix::invert propagate typeMask flags for some simple cases (Closed)

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

Patch Set 1 #

Patch Set 2 : New version of fix that does not regress perf in any case + bench tests #

Total comments: 1

Patch Set 3 : response to comments #

Total comments: 3

Patch Set 4 : uberoptimization #

Total comments: 2

Patch Set 5 : Added comment and removed tautological branches #

Patch Set 6 : added documentation to SkMatrix::getType #

Total comments: 3

Patch Set 7 : comment polish #

Unified diffs Side-by-side diffs Delta from patch set Stats (+155 lines, -31 lines) Patch
M bench/MatrixBench.cpp View 1 3 chunks +97 lines, -0 lines 0 comments Download
M include/core/SkMatrix.h View 1 2 3 4 5 6 1 chunk +6 lines, -5 lines 0 comments Download
M src/core/SkMatrix.cpp View 1 2 3 4 5 6 7 chunks +52 lines, -26 lines 0 comments Download

Messages

Total messages: 29
junov1
PTAL. SkMatrix::computeTypeMask was showing up as a hotspot in a lot of 2D canvas benchmarks ...
12 years, 5 months ago (2012-07-09 17:55:26 UTC) #1
reed1
1. add comment in the code describing why we can only do this for rectstaysrect() ...
12 years, 5 months ago (2012-07-09 18:09:33 UTC) #2
TomH
This has been a hotspot before; we'd addressed the worst of it then, but there ...
12 years, 5 months ago (2012-07-09 18:29:53 UTC) #3
junov1
On 2012/07/09 18:29:53, TomH wrote: > Which 2D canvas benchmarks? In particular, I did a ...
12 years, 5 months ago (2012-07-09 18:38:55 UTC) #4
reed1
lets write a bench (if we don't already have one) to test this (and be ...
12 years, 5 months ago (2012-07-09 18:40:19 UTC) #5
junov1
On 2012/07/09 18:40:19, reed1 wrote: > lets write a bench (if we don't already have ...
12 years, 5 months ago (2012-07-09 21:01:33 UTC) #6
TomH
If you're seeing any hotspot contribution from computePerspectiveTypeMask(), I can't help noticing that I didn't ...
12 years, 5 months ago (2012-07-09 21:09:58 UTC) #7
TomH
Also, I think you could break lines 112-129 into a separate computeRectStaysRectMask() function, given that ...
12 years, 5 months ago (2012-07-09 21:11:15 UTC) #8
junov1
On 2012/07/09 21:11:15, TomH wrote: > Also, I think you could break lines 112-129 into ...
12 years, 5 months ago (2012-07-10 13:57:17 UTC) #9
junov1
New patch fixes perf, adds bench tests.
12 years, 5 months ago (2012-07-10 14:46:12 UTC) #10
TomH
http://codereview.appspot.com/6380043/diff/8001/src/core/SkMatrix.cpp File src/core/SkMatrix.cpp (right): http://codereview.appspot.com/6380043/diff/8001/src/core/SkMatrix.cpp#newcode918 src/core/SkMatrix.cpp:918: // simple to derive algebraically from the expressions above. ...
12 years, 5 months ago (2012-07-10 14:53:32 UTC) #11
reed1
Conceding the SSE code, what are the bench results (old and new) with this CL?
12 years, 5 months ago (2012-07-10 15:39:26 UTC) #12
junov1
On 2012/07/10 15:39:26, reed1 wrote: > Conceding the SSE code, what are the bench results ...
12 years, 5 months ago (2012-07-10 17:48:34 UTC) #13
junov1
On 2012/07/10 14:53:32, TomH wrote: > The last sentence here does not contribute to the ...
12 years, 5 months ago (2012-07-10 17:53:54 UTC) #14
reed1
http://codereview.appspot.com/6380043/diff/13001/src/core/SkMatrix.cpp File src/core/SkMatrix.cpp (right): http://codereview.appspot.com/6380043/diff/13001/src/core/SkMatrix.cpp#newcode916 src/core/SkMatrix.cpp:916: // In those cases, the inverse has a translation ...
12 years, 5 months ago (2012-07-10 18:20:07 UTC) #15
junov1
http://codereview.appspot.com/6380043/diff/13001/src/core/SkMatrix.cpp File src/core/SkMatrix.cpp (right): http://codereview.appspot.com/6380043/diff/13001/src/core/SkMatrix.cpp#newcode916 src/core/SkMatrix.cpp:916: // In those cases, the inverse has a translation ...
12 years, 5 months ago (2012-07-10 18:26:05 UTC) #16
junov1
After chatting with Mike, found a way to make so that the type mask of ...
12 years, 5 months ago (2012-07-10 21:04:04 UTC) #17
reed1
lgtm do we need more (or different) unittests, to ensure that our new invariant is ...
12 years, 5 months ago (2012-07-10 21:10:59 UTC) #18
TomH
http://codereview.appspot.com/6380043/diff/15002/src/core/SkMatrix.cpp File src/core/SkMatrix.cpp (right): http://codereview.appspot.com/6380043/diff/15002/src/core/SkMatrix.cpp#newcode66 src/core/SkMatrix.cpp:66: return SkToU8(kORableMasks); You've changed the semantics here! You're setting ...
12 years, 5 months ago (2012-07-10 21:13:36 UTC) #19
junov1
On 2012/07/10 21:13:36, TomH wrote: > > http://codereview.appspot.com/6380043/diff/15002/src/core/SkMatrix.cpp#newcode66 > src/core/SkMatrix.cpp:66: return SkToU8(kORableMasks); > You've changed ...
12 years, 5 months ago (2012-07-11 14:17:39 UTC) #20
TomH
On 2012/07/11 14:17:39, junov1 wrote: > On 2012/07/10 21:13:36, TomH wrote: > > > > ...
12 years, 5 months ago (2012-07-11 14:29:14 UTC) #21
junov1
New patch has improved comments, for clarity. I also removed two conditional branches "if ((mask ...
12 years, 5 months ago (2012-07-11 15:15:20 UTC) #22
TomH
http://codereview.appspot.com/6380043/diff/16002/include/core/SkMatrix.h File include/core/SkMatrix.h (right): http://codereview.appspot.com/6380043/diff/16002/include/core/SkMatrix.h#newcode50 include/core/SkMatrix.h:50: arithmetic as is necessary. When a bit is turned ...
12 years, 5 months ago (2012-07-11 15:38:42 UTC) #23
junov1
On 2012/07/11 15:38:42, TomH wrote: > Also, the comments on TypeMask are also lying, and ...
12 years, 5 months ago (2012-07-11 15:51:47 UTC) #24
TomH
On 2012/07/11 15:51:47, junov1 wrote: > On 2012/07/11 15:38:42, TomH wrote: > > > Also, ...
12 years, 5 months ago (2012-07-11 15:56:44 UTC) #25
junov1
On 2012/07/11 15:56:44, TomH wrote: > > "set if the matrix has translation" OR it's ...
12 years, 5 months ago (2012-07-11 17:38:58 UTC) #26
junov1
Patch uploaded. I ended pasting almost exactly what you suggested, I like that it's concise.
12 years, 5 months ago (2012-07-11 17:52:36 UTC) #27
TomH
LGTM
12 years, 5 months ago (2012-07-11 17:57:06 UTC) #28
junov1
12 years, 5 months ago (2012-07-16 19:05:13 UTC) #29
Fixed with r4562
Sign in to reply to this message.

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