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
diff --git a/src/gpu/gl/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp
index f34fce4..a87aa5a 100644
--- a/src/gpu/gl/GrGLProgram.cpp
+++ b/src/gpu/gl/GrGLProgram.cpp
@@ -70,8 +70,7 @@
// we set the textures, and uniforms for installed processors in a generic way, but subclasses
// of GLProgram determine how to set coord transforms
int nextSamplerIdx = 0;
- fGeometryProcessor->setData(fProgramDataManager, primProc,
- GrFragmentProcessor::CoordTransformIter(pipeline));
+ fGeometryProcessor->setData(fProgramDataManager, primProc);
this->bindTextures(primProc, pipeline.getAllowSRGBInputs(), &nextSamplerIdx);
this->setFragmentData(primProc, pipeline, &nextSamplerIdx);
@@ -108,10 +107,16 @@
for (int i = 0; i < numProcessors; ++i) {
const GrFragmentProcessor& processor = pipeline.getFragmentProcessor(i);
fFragmentProcessors[i]->setData(fProgramDataManager, processor);
+ this->setTransformData(primProc, processor, i);
this->bindTextures(processor, pipeline.getAllowSRGBInputs(), nextSamplerIdx);
}
}
-
+void GrGLProgram::setTransformData(const GrPrimitiveProcessor& primProc,
+ const GrFragmentProcessor& processor,
+ int index) {
+ fGeometryProcessor->setTransformData(primProc, fProgramDataManager, index,
+ processor.coordTransforms());
+}
void GrGLProgram::setRenderTargetState(const GrPrimitiveProcessor& primProc,
const GrPipeline& pipeline) {