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

Issue 6496135: Move GrTextureParams from GrSamplerState to GrTextureAccess (Closed)

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

Patch Set 1 #

Patch Set 2 : minor cleanup #

Total comments: 13
Unified diffs Side-by-side diffs Delta from patch set Stats (+298 lines, -197 lines) Patch
M include/gpu/GrSamplerState.h View 4 chunks +4 lines, -81 lines 0 comments Download
M include/gpu/GrTextureAccess.h View 3 chunks +127 lines, -7 lines 4 comments Download
M include/gpu/SkGpuDevice.h View 1 chunk +6 lines, -2 lines 0 comments Download
M src/effects/gradients/SkGradientShader.cpp View 2 chunks +8 lines, -4 lines 2 comments Download
M src/effects/gradients/SkGradientShaderPriv.h View 1 chunk +3 lines, -2 lines 0 comments Download
M src/effects/gradients/SkLinearGradient.cpp View 2 chunks +3 lines, -7 lines 2 comments Download
M src/effects/gradients/SkRadialGradient.cpp View 2 chunks +3 lines, -8 lines 0 comments Download
M src/effects/gradients/SkSweepGradient.cpp View 2 chunks +3 lines, -7 lines 0 comments Download
M src/effects/gradients/SkTwoPointConicalGradient.cpp View 2 chunks +5 lines, -7 lines 0 comments Download
M src/effects/gradients/SkTwoPointRadialGradient.cpp View 2 chunks +3 lines, -7 lines 0 comments Download
M src/gpu/GrContext.cpp View 4 chunks +5 lines, -7 lines 0 comments Download
M src/gpu/GrCustomStage.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/gpu/GrDrawState.h View 1 chunk +6 lines, -0 lines 0 comments Download
M src/gpu/GrTextContext.cpp View 2 chunks +4 lines, -3 lines 0 comments Download
M src/gpu/GrTextureAccess.cpp View 1 2 chunks +61 lines, -20 lines 0 comments Download
M src/gpu/SkGpuDevice.cpp View 1 16 chunks +29 lines, -30 lines 2 comments Download
M src/gpu/effects/GrSingleTextureEffect.h View 1 chunk +7 lines, -0 lines 0 comments Download
M src/gpu/effects/GrSingleTextureEffect.cpp View 1 chunk +8 lines, -0 lines 0 comments Download
M src/gpu/effects/GrTextureDomainEffect.h View 1 chunk +4 lines, -1 line 1 comment Download
M src/gpu/effects/GrTextureDomainEffect.cpp View 1 chunk +7 lines, -0 lines 2 comments Download
M src/gpu/gl/GrGpuGL.cpp View 1 chunk +1 line, -3 lines 0 comments Download

Messages

Total messages: 4
bsalomon
Currently the GrTextureParams are set on GrSamplerState. This is wrong for at least reasons: 1) ...
11 years, 9 months ago (2012-09-17 21:47:53 UTC) #1
TomH
Why not combine and have an "unknown" enum or an "incomplete" flag? Eh, no, probably ...
11 years, 9 months ago (2012-09-17 21:57:32 UTC) #2
robertphillips
LGTM + some nits & questions https://codereview.appspot.com/6496135/diff/2001/include/gpu/GrTextureAccess.h File include/gpu/GrTextureAccess.h (right): https://codereview.appspot.com/6496135/diff/2001/include/gpu/GrTextureAccess.h#newcode19 include/gpu/GrTextureAccess.h:19: * GrTextureAccess (defined ...
11 years, 9 months ago (2012-09-18 12:41:00 UTC) #3
bsalomon
11 years, 9 months ago (2012-09-18 14:15:16 UTC) #4
Committed as r5582

https://codereview.appspot.com/6496135/diff/2001/include/gpu/GrTextureAccess.h
File include/gpu/GrTextureAccess.h (right):

https://codereview.appspot.com/6496135/diff/2001/include/gpu/GrTextureAccess....
include/gpu/GrTextureAccess.h:19: * GrTextureAccess (defined below). Also, some
of the texture cache methods require knowledge about
On 2012/09/18 12:41:00, robertphillips wrote:
> about about

Done.

https://codereview.appspot.com/6496135/diff/2001/include/gpu/GrTextureAccess....
include/gpu/GrTextureAccess.h:126: * swizzle must be a string between one and
four (inclusive) characters containing only 'r',
On 2012/09/18 12:41:00, robertphillips wrote:
> I don't think the "Uses default GrTextureParams" is correct

Done.

https://codereview.appspot.com/6496135/diff/2001/src/effects/gradients/SkGrad...
File src/effects/gradients/SkGradientShader.cpp (right):

https://codereview.appspot.com/6496135/diff/2001/src/effects/gradients/SkGrad...
src/effects/gradients/SkGradientShader.cpp:739: 
On 2012/09/18 12:41:00, robertphillips wrote:
> Comment here about ModeY always being clamp and filtering always being on?

Done.

https://codereview.appspot.com/6496135/diff/2001/src/effects/gradients/SkLine...
File src/effects/gradients/SkLinearGradient.cpp (right):

https://codereview.appspot.com/6496135/diff/2001/src/effects/gradients/SkLine...
src/effects/gradients/SkLinearGradient.cpp:563:
sampler->matrix()->preConcat(fPtsToUnit);
On 2012/09/18 12:41:00, robertphillips wrote:
> indentation?

Done.

https://codereview.appspot.com/6496135/diff/2001/src/gpu/SkGpuDevice.cpp
File src/gpu/SkGpuDevice.cpp (right):

https://codereview.appspot.com/6496135/diff/2001/src/gpu/SkGpuDevice.cpp#newc...
src/gpu/SkGpuDevice.cpp:1294: }
On 2012/09/18 12:41:00, robertphillips wrote:
> Is there a ctor for this?

Currently the order of params between GrTextureAccess and GrTextureParams is
different:

(bilerp, tm) for params
(tm, bilerp) for access

I think the latter is better since we care about the filter in more places than
the tm. A coming change will make them consistent and can save a line here.

https://codereview.appspot.com/6496135/diff/2001/src/gpu/effects/GrTextureDom...
File src/gpu/effects/GrTextureDomainEffect.cpp (right):

https://codereview.appspot.com/6496135/diff/2001/src/gpu/effects/GrTextureDom...
src/gpu/effects/GrTextureDomainEffect.cpp:99:
GrTextureDomainEffect::GrTextureDomainEffect(GrTexture* texture,
On 2012/09/18 12:41:00, robertphillips wrote:
> Why isn't domain a const& ?

Good catch, changed.
Sign in to reply to this message.

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