aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2014-12-19 13:45:20 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-12-19 13:45:20 -0800
commit290c09b8bbd8d221d363150e2ce87158f4668df0 (patch)
tree7989675060a6bd1bcd7626139810079d5add3d76 /include
parentbd2f0f34cfa0debf2b60fd864c432ef5cbe96503 (diff)
initial changes to add local matrix to primitive processor
Diffstat (limited to 'include')
-rw-r--r--include/gpu/GrFragmentProcessor.h7
-rw-r--r--include/gpu/GrPaint.h9
2 files changed, 6 insertions, 10 deletions
diff --git a/include/gpu/GrFragmentProcessor.h b/include/gpu/GrFragmentProcessor.h
index 0c155996d5..fe6e6faf14 100644
--- a/include/gpu/GrFragmentProcessor.h
+++ b/include/gpu/GrFragmentProcessor.h
@@ -25,7 +25,8 @@ public:
GrFragmentProcessor()
: INHERITED()
, fWillReadDstColor(false)
- , fWillUseInputColor(true) {}
+ , fWillUseInputColor(true)
+ , fUsesLocalCoords(false) {}
/** Implemented using GLFragmentProcessor::GenKey as described in this class's comment. */
virtual void getGLProcessorKey(const GrGLCaps& caps,
@@ -52,6 +53,9 @@ public:
/** Will this prceossor read the source color value? */
bool willUseInputColor() const { return fWillUseInputColor; }
+ /** Do any of the coordtransforms for this processor require local coords? */
+ bool usesLocalCoords() const { return fUsesLocalCoords; }
+
/** Returns true if this and other processor conservatively draw identically. It can only return
true when the two processor are of the same subclass (i.e. they return the same object from
from getFactory()).
@@ -130,6 +134,7 @@ private:
SkSTArray<4, const GrCoordTransform*, true> fCoordTransforms;
bool fWillReadDstColor;
bool fWillUseInputColor;
+ bool fUsesLocalCoords;
typedef GrProcessor INHERITED;
};
diff --git a/include/gpu/GrPaint.h b/include/gpu/GrPaint.h
index 41b838cb35..d60b47ffc3 100644
--- a/include/gpu/GrPaint.h
+++ b/include/gpu/GrPaint.h
@@ -151,15 +151,6 @@ public:
* DO NOT USE THESE
* TODO Remove remaining use cases and delete these
*/
- void localCoordChange(const SkMatrix& oldToNew) {
- for (int i = 0; i < fColorStages.count(); ++i) {
- fColorStages[i].localCoordChange(oldToNew);
- }
- for (int i = 0; i < fCoverageStages.count(); ++i) {
- fCoverageStages[i].localCoordChange(oldToNew);
- }
- }
-
bool localCoordChangeInverse(const SkMatrix& newToOld) {
SkMatrix oldToNew;
bool computed = false;