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

Issue 6818064: Checkpoint in mving texture matrices out of GrGLProgram and into GrGLEffect. (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
CC:
skia-review_googlegroups.com
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Checkpoint in moving texture matrices out of GrGLProgram and into GrGLEffect. Committed: https://code.google.com/p/skia/source/detail?r=6233

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 12
Unified diffs Side-by-side diffs Delta from patch set Stats (+685 lines, -125 lines) Patch
M gm/texdata.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M gyp/gpu.gypi View 1 1 chunk +2 lines, -0 lines 0 comments Download
M include/gpu/GrEffectUnitTest.h View 1 2 2 chunks +13 lines, -4 lines 0 comments Download
M src/effects/SkBlendImageFilter.cpp View 1 7 chunks +29 lines, -11 lines 0 comments Download
M src/effects/SkColorMatrixFilter.cpp View 1 1 chunk +2 lines, -0 lines 2 comments Download
M src/effects/gradients/SkGradientShader.cpp View 1 4 chunks +31 lines, -2 lines 0 comments Download
M src/effects/gradients/SkGradientShaderPriv.h View 1 2 6 chunks +37 lines, -2 lines 0 comments Download
M src/effects/gradients/SkLinearGradient.cpp View 1 4 chunks +15 lines, -7 lines 0 comments Download
M src/effects/gradients/SkRadialGradient.cpp View 1 4 chunks +16 lines, -8 lines 0 comments Download
M src/effects/gradients/SkSweepGradient.cpp View 1 4 chunks +12 lines, -8 lines 0 comments Download
M src/effects/gradients/SkTwoPointConicalGradient.cpp View 1 8 chunks +21 lines, -11 lines 0 comments Download
M src/effects/gradients/SkTwoPointRadialGradient.cpp View 1 7 chunks +26 lines, -16 lines 2 comments Download
M src/gpu/GrContext.cpp View 1 2 chunks +3 lines, -3 lines 0 comments Download
M src/gpu/GrDrawState.h View 1 1 chunk +4 lines, -4 lines 0 comments Download
M src/gpu/GrEffect.cpp View 1 1 chunk +20 lines, -0 lines 0 comments Download
M src/gpu/SkGpuDevice.cpp View 1 4 chunks +4 lines, -4 lines 0 comments Download
M src/gpu/effects/GrSingleTextureEffect.h View 1 2 2 chunks +16 lines, -6 lines 0 comments Download
M src/gpu/effects/GrSingleTextureEffect.cpp View 1 2 4 chunks +49 lines, -6 lines 0 comments Download
M src/gpu/gl/GrGLEffect.h View 1 2 chunks +10 lines, -1 line 0 comments Download
M src/gpu/gl/GrGLEffect.cpp View 1 1 chunk +2 lines, -0 lines 0 comments Download
A src/gpu/gl/GrGLEffectMatrix.h View 1 1 chunk +97 lines, -0 lines 0 comments Download
A src/gpu/gl/GrGLEffectMatrix.cpp View 1 2 1 chunk +215 lines, -0 lines 8 comments Download
M src/gpu/gl/GrGLProgram.cpp View 1 2 1 chunk +38 lines, -31 lines 0 comments Download
M src/gpu/gl/GrGLUniformManager.h View 1 2 chunks +4 lines, -0 lines 0 comments Download
M src/gpu/gl/GrGLUniformManager.cpp View 1 2 chunks +18 lines, -0 lines 0 comments Download

Messages

Total messages: 3
bsalomon
Once all effects that require matrices are using GrGLEffectMatrix there is a lot more stuff ...
11 years, 8 months ago (2012-10-31 20:28:21 UTC) #1
robertphillips
Ouch - but LGTM. Some minor nits & questions. https://codereview.appspot.com/6818064/diff/1002/src/effects/SkColorMatrixFilter.cpp File src/effects/SkColorMatrixFilter.cpp (right): https://codereview.appspot.com/6818064/diff/1002/src/effects/SkColorMatrixFilter.cpp#newcode352 src/effects/SkColorMatrixFilter.cpp:352: ...
11 years, 8 months ago (2012-11-01 13:03:25 UTC) #2
bsalomon
11 years, 8 months ago (2012-11-01 13:41:33 UTC) #3
https://codereview.appspot.com/6818064/diff/1002/src/effects/SkColorMatrixFil...
File src/effects/SkColorMatrixFilter.cpp (right):

https://codereview.appspot.com/6818064/diff/1002/src/effects/SkColorMatrixFil...
src/effects/SkColorMatrixFilter.cpp:352: ,
fVectorHandle(GrGLUniformManager::kInvalidUniformHandle) {
On 2012/11/01 13:03:25, robertphillips wrote:
> doesn't it just not use texture coordinates at all?

Oh you're right... I was thinking of the table color filter that uses incoming
colors to compute coords... this guy doesn't use a texture at all.

Fixed.

https://codereview.appspot.com/6818064/diff/1002/src/effects/gradients/SkTwoP...
File src/effects/gradients/SkTwoPointRadialGradient.cpp (right):

https://codereview.appspot.com/6818064/diff/1002/src/effects/gradients/SkTwoP...
src/effects/gradients/SkTwoPointRadialGradient.cpp:653: if (static_cast<const
GrRadial2Gradient&>(*s.getEffect()).isDegenerate()) {
On 2012/11/01 13:03:25, robertphillips wrote:
> I don't know if it is worth it but, what do you think about making an enum for
> the degenerate flag here and in GrGLConical2Gradient?

Done:

enum {
    kIsDegenerate = 1 << kMatrixKeyBitCnt,
};

EffectKey key = GenMatrixKey(s);
if (static_cast<const GrRadial2Gradient&>(*s.getEffect()).isDegenerate()) {
   key |= kIsDegenerate;
}
return key;

https://codereview.appspot.com/6818064/diff/1002/src/gpu/gl/GrGLEffectMatrix.cpp
File src/gpu/gl/GrGLEffectMatrix.cpp (right):

https://codereview.appspot.com/6818064/diff/1002/src/gpu/gl/GrGLEffectMatrix....
src/gpu/gl/GrGLEffectMatrix.cpp:75: fUni =
builder->addUniform(GrGLShaderBuilder::kVertex_ShaderType,
On 2012/11/01 13:03:25, robertphillips wrote:
> indent?

Done.

https://codereview.appspot.com/6818064/diff/1002/src/gpu/gl/GrGLEffectMatrix....
src/gpu/gl/GrGLEffectMatrix.cpp:138: GrSLType varyingType =
this->emitCode(builder,
On 2012/11/01 13:03:25, robertphillips wrote:
> indent?

Done.

https://codereview.appspot.com/6818064/diff/1002/src/gpu/gl/GrGLEffectMatrix....
src/gpu/gl/GrGLEffectMatrix.cpp:145: 
On 2012/11/01 13:03:25, robertphillips wrote:
> I see "StageCoord" repeated in a couple of places. Does it make sense to
define
> it somewhere to ensure uniformity?

Now that I look at it I actually think it was wrong to name them the same thing.
One is a varying and the other is the computed from the varying in FS by doing
perspective division. The builder does some appending that makes the final names
unique, but still. I renamed the latter "coords2D"

https://codereview.appspot.com/6818064/diff/1002/src/gpu/gl/GrGLEffectMatrix....
src/gpu/gl/GrGLEffectMatrix.cpp:185: uniformManager.set2f(fUni,
On 2012/11/01 13:03:25, robertphillips wrote:
> Why not use tx & ty here?
Done (duh)
Sign in to reply to this message.

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