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

Unified Diff: src/gpu/gl/builders/GrGLProgramBuilder.cpp

Issue 1243583002: Add support for transformedLocalCoords to GrDefaultGeoProc (Closed) Base URL: https://skia.googlesource.com/skia.git@pipelinetobatch2
Patch Set: tweaks Created 5 years, 4 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/GrGLGeometryProcessor.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/builders/GrGLProgramBuilder.cpp
diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.cpp b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
index daa24800d2e9664f63b3c287c5223007aead50ce..c7528f0d4d0ca680c84cdc51fecf6ecfb965ecfa 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) {
« no previous file with comments | « src/gpu/gl/GrGLGeometryProcessor.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698