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

Unified Diff: src/gpu/GrPrimitiveProcessor.h

Issue 1131513005: remove localmatrix from GrGeometryProcessor base class (Closed) Base URL: https://skia.googlesource.com/skia.git@cleanup4
Patch Set: tweaks Created 5 years, 7 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/GrPathProcessor.cpp ('k') | src/gpu/effects/GrBezierEffect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrPrimitiveProcessor.h
diff --git a/src/gpu/GrPrimitiveProcessor.h b/src/gpu/GrPrimitiveProcessor.h
index 8d94525438e9fa9e987ca7244df61fdcfb906427..2e25bdbab89963945ce8a663f4f5613588f1b4e8 100644
--- a/src/gpu/GrPrimitiveProcessor.h
+++ b/src/gpu/GrPrimitiveProcessor.h
@@ -102,10 +102,6 @@ enum GrGPInput {
*/
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 @@ public:
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 @@ protected:
private:
virtual bool hasExplicitLocalCoords() const = 0;
- SkMatrix fLocalMatrix;
bool fIsPathRendering;
typedef GrProcessor INHERITED;
« no previous file with comments | « src/gpu/GrPathProcessor.cpp ('k') | src/gpu/effects/GrBezierEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698