aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/GrEffectStage.h
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-10-26 17:53:18 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-10-26 17:53:18 +0000
commit28a15fb8d603847949a61657ef5cb73ed9915021 (patch)
tree0078f8fb070a3f0c11c03d2f7a9df5a2912273c9 /include/gpu/GrEffectStage.h
parentc96982f806712dee912875b0bd59b75468ac3a99 (diff)
Make GrGLEffect::setData take GrEffectStage rather than GrEffect.
This allows the coord-change matrix to be communicated to setData(). An accessor for this matrix is also added to GrEffectStage. R=robertphillips@google.com Review URL: https://codereview.appspot.com/6779057 git-svn-id: http://skia.googlecode.com/svn/branches/gpu_dev@6143 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/gpu/GrEffectStage.h')
-rw-r--r--include/gpu/GrEffectStage.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/include/gpu/GrEffectStage.h b/include/gpu/GrEffectStage.h
index 6f8b23fea9..23b629a166 100644
--- a/include/gpu/GrEffectStage.h
+++ b/include/gpu/GrEffectStage.h
@@ -8,8 +8,8 @@
-#ifndef GrSamplerState_DEFINED
-#define GrSamplerState_DEFINED
+#ifndef GrEffectStage_DEFINED
+#define GrEffectStage_DEFINED
#include "GrEffect.h"
#include "GrMatrix.h"
@@ -79,7 +79,7 @@ public:
* This gets the current coordinate system change. It is the accumulation of
* preConcatCoordChange calls since the effect was installed. It is used when then caller
* wants to temporarily change the source geometry coord system, draw something, and then
- * restore the previous coord system (e.g. temporarily draw in device coords).s
+ * restore the previous coord system (e.g. temporarily draw in device coords).
*/
void saveCoordChange(SavedCoordChange* savedCoordChange) const {
savedCoordChange->fCoordChangeMatrix = fCoordChangeMatrix;
@@ -106,13 +106,19 @@ public:
/**
* Gets the matrix to apply at draw time. This is the original texture matrix combined with
- * any coord system changes.
+ * any coord system changes. This will be removed when the matrix is managed by GrEffect.
*/
void getTotalMatrix(GrMatrix* matrix) const {
*matrix = fMatrix;
matrix->preConcat(fCoordChangeMatrix);
}
+ /**
+ * Gets the matrix representing all changes of coordinate system since the GrEffect was
+ * installed in the stage.
+ */
+ const GrMatrix& getCoordChangeMatrix() const { return fCoordChangeMatrix; }
+
void reset() {
GrSafeSetNull(fEffect);
}