remove localmatrix from GrGeometryProcessor base class
BUG=skia:
Review URL: https://codereview.chromium.org/1131513005
diff --git a/src/gpu/GrPrimitiveProcessor.h b/src/gpu/GrPrimitiveProcessor.h
index 8d94525..2e25bdb 100644
--- a/src/gpu/GrPrimitiveProcessor.h
+++ b/src/gpu/GrPrimitiveProcessor.h
@@ -102,10 +102,6 @@
*/
class GrPrimitiveProcessor : public GrProcessor {
public:
- // TODO let the PrimProc itself set this in its setData call, this should really live on the
- // bundle of primitive data
- const SkMatrix& localMatrix() const { return fLocalMatrix; }
-
virtual void initBatchTracker(GrBatchTracker*, const GrPipelineInfo&) const = 0;
virtual bool canMakeEqual(const GrBatchTracker& mine,
@@ -173,42 +169,11 @@
bool isPathRendering() const { return fIsPathRendering; }
protected:
- GrPrimitiveProcessor(const SkMatrix& localMatrix, bool isPathRendering)
+ GrPrimitiveProcessor(bool isPathRendering)
: fNumAttribs(0)
, fVertexStride(0)
- , fLocalMatrix(localMatrix)
, fIsPathRendering(isPathRendering) {}
- /*
- * CanCombineOutput will return true if two draws are 'batchable' from a color perspective.
- * TODO remove this when GPs can upgrade to attribute color
- */
- static bool CanCombineOutput(GrGPInput left, GrColor lColor, GrGPInput right, GrColor rColor) {
- if (left != right) {
- return false;
- }
-
- if (kUniform_GrGPInput == left && lColor != rColor) {
- return false;
- }
-
- return true;
- }
-
- static bool CanCombineLocalMatrices(const GrPrimitiveProcessor& left,
- bool leftUsesLocalCoords,
- const GrPrimitiveProcessor& right,
- bool rightUsesLocalCoords) {
- if (leftUsesLocalCoords != rightUsesLocalCoords) {
- return false;
- }
-
- if (leftUsesLocalCoords && !left.localMatrix().cheapEqualTo(right.localMatrix())) {
- return false;
- }
- return true;
- }
-
Attribute fAttribs[kMaxVertexAttribs];
int fNumAttribs;
size_t fVertexStride;
@@ -216,7 +181,6 @@
private:
virtual bool hasExplicitLocalCoords() const = 0;
- SkMatrix fLocalMatrix;
bool fIsPathRendering;
typedef GrProcessor INHERITED;