Index: src/gpu/gl/GrGLGeometryProcessor.h |
diff --git a/src/gpu/gl/GrGLGeometryProcessor.h b/src/gpu/gl/GrGLGeometryProcessor.h |
index 88baecf879886d3662752630396463da9df3b393..412dca21347c0d8c8c030ff193c7694f47b303ce 100644 |
--- a/src/gpu/gl/GrGLGeometryProcessor.h |
+++ b/src/gpu/gl/GrGLGeometryProcessor.h |
@@ -19,6 +19,8 @@ class GrGLGPBuilder; |
*/ |
class GrGLGeometryProcessor : public GrGLPrimitiveProcessor { |
public: |
+ GrGLGeometryProcessor() : fTransformedLocalCoords(false) {} |
+ |
/* Any general emit code goes in the base class emitCode. Subclasses override onEmitCode */ |
void emitCode(EmitArgs&) override; |
@@ -90,6 +92,11 @@ private: |
const GrGLProgramDataManager& pdman, |
int index, |
const SkTArray<const GrCoordTransform*, true>& transforms) { |
+ // No need to set if our local coords have already been transformed |
+ if (fTransformedLocalCoords) { |
+ return; |
+ } |
+ |
SkSTArray<2, Transform, true>& procTransforms = fInstalledTransforms[index]; |
int numTransforms = transforms.count(); |
for (int t = 0; t < numTransforms; ++t) { |
@@ -104,6 +111,7 @@ private: |
virtual void onEmitCode(EmitArgs&, GrGPArgs*) = 0; |
+ bool fTransformedLocalCoords; |
typedef GrGLPrimitiveProcessor INHERITED; |
}; |