Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(313)

Unified Diff: src/gpu/glsl/GrGLSLFragmentProcessor.h

Issue 2351753002: Revert of Stop flattening GrCoordTransforms in parent GrFragmentProcessors. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/GrGLProgram.cpp ('k') | src/gpu/glsl/GrGLSLFragmentProcessor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/glsl/GrGLSLFragmentProcessor.h
diff --git a/src/gpu/glsl/GrGLSLFragmentProcessor.h b/src/gpu/glsl/GrGLSLFragmentProcessor.h
index 9889bcc9c64546498323714b09bcd53ff1718237..f4a93ebe71c35b41b49a62466e22d204ca45ab58 100644
--- a/src/gpu/glsl/GrGLSLFragmentProcessor.h
+++ b/src/gpu/glsl/GrGLSLFragmentProcessor.h
@@ -33,30 +33,6 @@
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 @@
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 @@
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 @@
, fFp(fp)
, fOutputColor(outputColor)
, fInputColor(inputColor)
- , fTransformedCoords(transformedCoordVars)
+ , fTransformedCoords(transformedCoords)
, fTexSamplers(texSamplers)
, fBufferSamplers(bufferSamplers)
, fGpImplementsDistanceVector(gpImplementsDistanceVector) {}
@@ -109,7 +85,7 @@
const GrFragmentProcessor& fFp;
const char* fOutputColor;
const char* fInputColor;
- const TransformedCoordVars& fTransformedCoords;
+ const SkTArray<GrShaderVar>& fTransformedCoords;
const SamplerHandle* fTexSamplers;
const SamplerHandle* fBufferSamplers;
bool fGpImplementsDistanceVector;
« no previous file with comments | « src/gpu/gl/GrGLProgram.cpp ('k') | src/gpu/glsl/GrGLSLFragmentProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698