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

Issue 6821056: Make SkShader store localM directly rather than as a separate alloc. (Closed)

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

Description

Make SkShader store localM directly rather than as a separate alloc. May cause very slight GM changes in gpu two pt radial/conical radients. Committed: https://code.google.com/p/skia/source/detail?r=6221

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 15

Patch Set 5 : Make SkShader store localM directly rather than as a separate alloc. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+84 lines, -141 lines) Patch
M include/core/SkShader.h View 1 2 3 4 2 chunks +10 lines, -7 lines 0 comments Download
M src/core/SkBitmapProcShader.cpp View 1 2 3 4 1 chunk +2 lines, -3 lines 0 comments Download
M src/core/SkComposeShader.cpp View 1 2 3 4 1 chunk +1 line, -2 lines 0 comments Download
M src/core/SkDraw.cpp View 1 2 3 4 3 chunks +7 lines, -10 lines 0 comments Download
M src/core/SkPicture.cpp View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M src/core/SkShader.cpp View 1 2 3 4 3 chunks +15 lines, -43 lines 0 comments Download
M src/device/xps/SkXPSDevice.cpp View 1 2 3 4 2 chunks +2 lines, -4 lines 0 comments Download
M src/effects/gradients/SkLinearGradient.cpp View 1 2 3 4 1 chunk +4 lines, -12 lines 0 comments Download
M src/effects/gradients/SkRadialGradient.cpp View 1 2 3 4 1 chunk +4 lines, -10 lines 0 comments Download
M src/effects/gradients/SkSweepGradient.cpp View 1 2 3 4 1 chunk +4 lines, -11 lines 0 comments Download
M src/effects/gradients/SkTwoPointConicalGradient.cpp View 1 2 3 4 1 chunk +11 lines, -14 lines 0 comments Download
M src/effects/gradients/SkTwoPointRadialGradient.cpp View 1 2 3 4 1 chunk +11 lines, -15 lines 0 comments Download
M src/gpu/SkGpuDevice.cpp View 1 2 3 4 2 chunks +10 lines, -9 lines 0 comments Download
M src/pdf/SkPDFShader.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 8
bsalomon
more than 40 net LOC removed. https://codereview.appspot.com/6821056/diff/6001/src/gpu/SkGpuDevice.cpp File src/gpu/SkGpuDevice.cpp (right): https://codereview.appspot.com/6821056/diff/6001/src/gpu/SkGpuDevice.cpp#newcode587 src/gpu/SkGpuDevice.cpp:587: // since our ...
11 years, 8 months ago (2012-10-31 15:10:05 UTC) #1
robertphillips
LGTM + 1 nit & two questions https://codereview.appspot.com/6821056/diff/6001/include/core/SkMatrix.h File include/core/SkMatrix.h (right): https://codereview.appspot.com/6821056/diff/6001/include/core/SkMatrix.h#newcode343 include/core/SkMatrix.h:343: if (inverse ...
11 years, 8 months ago (2012-10-31 15:43:03 UTC) #2
bsalomon
https://codereview.appspot.com/6821056/diff/6001/include/core/SkMatrix.h File include/core/SkMatrix.h (right): https://codereview.appspot.com/6821056/diff/6001/include/core/SkMatrix.h#newcode343 include/core/SkMatrix.h:343: if (inverse && inverse != this) { On 2012/10/31 ...
11 years, 8 months ago (2012-10-31 15:45:15 UTC) #3
reed1
can we land the matrix changes (w/ possible bench?) ahead of this CL? https://codereview.appspot.com/6821056/diff/6001/include/core/SkMatrix.h File ...
11 years, 8 months ago (2012-10-31 16:16:04 UTC) #4
bsalomon
>can we land the matrix changes (w/ possible bench?) ahead of this CL? Can do. ...
11 years, 8 months ago (2012-10-31 16:22:10 UTC) #5
reed1
lgtm w/ questions https://codereview.appspot.com/6821056/diff/6001/src/core/SkDraw.cpp File src/core/SkDraw.cpp (right): https://codereview.appspot.com/6821056/diff/6001/src/core/SkDraw.cpp#newcode2391 src/core/SkDraw.cpp:2391: if (texture_to_matrix(state, vertices, textures, &tempM)) { ...
11 years, 8 months ago (2012-10-31 16:43:00 UTC) #6
bsalomon
Make SkShader store localM directly rather than as a separate alloc.
11 years, 8 months ago (2012-10-31 17:43:44 UTC) #7
bsalomon
11 years, 8 months ago (2012-10-31 17:44:51 UTC) #8
https://codereview.appspot.com/6821056/diff/6001/src/core/SkDraw.cpp
File src/core/SkDraw.cpp (right):

https://codereview.appspot.com/6821056/diff/6001/src/core/SkDraw.cpp#newcode2391
src/core/SkDraw.cpp:2391: if (texture_to_matrix(state, vertices, textures,
&tempM)) {
On 2012/10/31 16:43:00, reed1 wrote:
> On 2012/10/31 15:45:15, bsalomon wrote:
> > On 2012/10/31 15:43:04, robertphillips wrote:
> > > Is this savedLocalM access guarded against an uninitialized memory read?
> > 
> > I assume so only because the next line accesses "shader". savedLocalM is
> always
> > set if shader is non-NULL.
> 
> True, tho note that now we *always* call postConcat, even if savedLocalM is
> identity (which may be common).
postConcat checks for identity.

https://codereview.appspot.com/6821056/diff/6001/src/core/SkDraw.cpp#newcode2413
src/core/SkDraw.cpp:2413: if (NULL != shader) {
On 2012/10/31 16:43:00, reed1 wrote:
> note: now we always call this, even when the matrix is (often?) identity. Not
> saying it matters, just a diff.

Yup, I assumed it didn't really matter

https://codereview.appspot.com/6821056/diff/6001/src/core/SkShader.cpp
File src/core/SkShader.cpp (right):

https://codereview.appspot.com/6821056/diff/6001/src/core/SkShader.cpp#newcode63
src/core/SkShader.cpp:63: const SkMatrix& origMatrix) {
On 2012/10/31 16:43:00, reed1 wrote:
> Not sure we need this change, since it means a copy right before a setter
> (setConcat).

Done.
Sign in to reply to this message.

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