diff options
author | 2015-08-05 11:05:22 -0700 | |
---|---|---|
committer | 2015-08-05 11:05:22 -0700 | |
commit | b2aa7cb90f4c66125056bac70dbca2093dd5ba41 (patch) | |
tree | 2a24701dd189ab74e9dc82f472a2a6c42834aff8 /src/gpu/gl/builders | |
parent | 0e8296eaa62eb8bc37b3ffc78523183f15dfc0d1 (diff) |
This CL wires up the backend portion necessary for sending transformed coords via vertex attributes.
BUG=skia:
Review URL: https://codereview.chromium.org/1243583002
Diffstat (limited to 'src/gpu/gl/builders')
-rw-r--r-- | src/gpu/gl/builders/GrGLProgramBuilder.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.cpp b/src/gpu/gl/builders/GrGLProgramBuilder.cpp index daa24800d2..c7528f0d4d 100644 --- a/src/gpu/gl/builders/GrGLProgramBuilder.cpp +++ b/src/gpu/gl/builders/GrGLProgramBuilder.cpp @@ -197,12 +197,15 @@ bool GrGLProgramBuilder::emitAndInstallProcs(GrGLSLExpr4* inputColor, GrGLSLExpr const GrPrimitiveProcessor& primProc = this->primitiveProcessor(); int totalTextures = primProc.numTextures(); const int maxTextureUnits = fGpu->glCaps().maxFragmentTextureUnits(); - SkSTArray<8, GrGLProcessor::TransformedCoordsArray> outCoords; + for (int i = 0; i < this->pipeline().numFragmentStages(); i++) { const GrFragmentProcessor* processor = this->pipeline().getFragmentStage(i).processor(); - SkSTArray<2, const GrCoordTransform*, true>& procCoords = fCoordTransforms.push_back(); - append_gr_fp_coord_transforms(processor, &procCoords); + if (!primProc.hasTransformedLocalCoords()) { + SkSTArray<2, const GrCoordTransform*, true>& procCoords = fCoordTransforms.push_back(); + + append_gr_fp_coord_transforms(processor, &procCoords); + } totalTextures += processor->numTexturesIncludeChildProcs(); if (totalTextures >= maxTextureUnits) { |