diff options
author | bsalomon <bsalomon@google.com> | 2016-09-19 09:26:40 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-09-19 09:26:40 -0700 |
commit | 56b7dc476ba5e4a53ab24b5830b5ed03e404006d (patch) | |
tree | 043e07baf151bab960421fbfc06af7e09bf9b67e /src/gpu/glsl/GrGLSLFragmentProcessor.h | |
parent | 9f262811b79f2c3f2c52c03cc2947431a36e8fbe (diff) |
Revert of Stop flattening GrCoordTransforms in parent GrFragmentProcessors. (patchset #3 id:40001 of https://codereview.chromium.org/2339203002/ )
Reason for revert:
Crashing blink
https://codereview.chromium.org/2351743002/
Original issue's description:
> Stop flattening GrCoordTransforms in parent GrFragmentProcessors.
>
> This changes moves to a model that iterates over GrCTs in a GrFP hierarchy when inserting transformations by GrGLSLPrimitiveProcessors.
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339203002
>
> Committed: https://skia.googlesource.com/skia/+/d91237ee051523f439238042674ade99207fe4a6
TBR=egdaniel@google.com,robertphillips@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review-Url: https://codereview.chromium.org/2351753002
Diffstat (limited to 'src/gpu/glsl/GrGLSLFragmentProcessor.h')
-rw-r--r-- | src/gpu/glsl/GrGLSLFragmentProcessor.h | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/src/gpu/glsl/GrGLSLFragmentProcessor.h b/src/gpu/glsl/GrGLSLFragmentProcessor.h index 9889bcc9c6..f4a93ebe71 100644 --- a/src/gpu/glsl/GrGLSLFragmentProcessor.h +++ b/src/gpu/glsl/GrGLSLFragmentProcessor.h @@ -33,30 +33,6 @@ public: typedef GrGLSLProgramDataManager::UniformHandle UniformHandle; typedef GrGLSLProgramDataManager::UniformHandle SamplerHandle; - /** - * When building a program from a GrPipeline this is used to provide the GrShaderVars that - * contain the resulting transformed coords from each of a GrFragmentProcessor's - * GrCoordTransforms. This allows the GrFragmentProcessor subclasses to refer to the transformed - * coords in fragment code. - */ - class TransformedCoordVars { - public: - TransformedCoordVars(const GrFragmentProcessor* fp, const GrShaderVar* vars) - : fFP(fp) - , fTransformedVars(vars) {} - - const GrShaderVar& operator[] (int i) const { - SkASSERT(i >= 0 && i < fFP->numCoordTransforms()); - return fTransformedVars[i]; - } - - TransformedCoordVars childTransforms(int childIdx) const; - - private: - const GrFragmentProcessor* fFP; - const GrShaderVar* fTransformedVars; - }; - /** Called when the program stage should insert its code into the shaders. The code in each shader will be in its own block ({}) and so locally scoped names will not collide across stages. @@ -74,7 +50,7 @@ public: etc.) that allows the processor to communicate back similar known info about its output. @param transformedCoords Fragment shader variables containing the coords computed using - each of the GrFragmentProcessor's GrCoordTransforms. + each of the GrFragmentProcessor's Coord Transforms. @param texSamplers Contains one entry for each GrTextureAccess of the GrProcessor. These can be passed to the builder to emit texture reads in the generated code. @@ -89,7 +65,7 @@ public: const GrFragmentProcessor& fp, const char* outputColor, const char* inputColor, - const TransformedCoordVars& transformedCoordVars, + const SkTArray<GrShaderVar>& transformedCoords, const SamplerHandle* texSamplers, const SamplerHandle* bufferSamplers, bool gpImplementsDistanceVector) @@ -99,7 +75,7 @@ public: , fFp(fp) , fOutputColor(outputColor) , fInputColor(inputColor) - , fTransformedCoords(transformedCoordVars) + , fTransformedCoords(transformedCoords) , fTexSamplers(texSamplers) , fBufferSamplers(bufferSamplers) , fGpImplementsDistanceVector(gpImplementsDistanceVector) {} @@ -109,7 +85,7 @@ public: const GrFragmentProcessor& fFp; const char* fOutputColor; const char* fInputColor; - const TransformedCoordVars& fTransformedCoords; + const SkTArray<GrShaderVar>& fTransformedCoords; const SamplerHandle* fTexSamplers; const SamplerHandle* fBufferSamplers; bool fGpImplementsDistanceVector; |