Chromium Code Reviews| Index: src/gpu/GrDrawState.h |
| diff --git a/src/gpu/GrDrawState.h b/src/gpu/GrDrawState.h |
| index ec0ccade3746dec09bb10201b03eec04c903b38d..1f4654ffb51414ba91ae6bdd07ae612b183e9a99 100644 |
| --- a/src/gpu/GrDrawState.h |
| +++ b/src/gpu/GrDrawState.h |
| @@ -185,6 +185,14 @@ public: |
| /// the color / coverage distinction. |
| //// |
| + const GrEffect* setGeometryProcessor(const GrEffect* effect, int attr0 = -1, int attr1 = -1) { |
| + SkASSERT(NULL != effect); |
| + SkASSERT(NULL == this->getGeometryProcessor()); |
| + fGeometryProcessor.reset(new GrEffectStage(effect, attr0, attr1)); |
| + this->invalidateBlendOptFlags(); |
| + return effect; |
| + } |
| + |
| const GrEffect* addColorEffect(const GrEffect* effect, int attr0 = -1, int attr1 = -1) { |
|
bsalomon
2014/08/29 15:07:25
Maybe a next small next change is to remove the at
joshua.litt
2014/09/02 16:06:21
yep, I am going to do a refactoring pass after thi
|
| SkASSERT(NULL != effect); |
| SkNEW_APPEND_TO_TARRAY(&fColorStages, GrEffectStage, (effect, attr0, attr1)); |
| @@ -242,6 +250,7 @@ public: |
| private: |
| GrDrawState* fDrawState; |
| + SkAutoTUnref<GrEffectStage> fGeometryProcessor; |
| int fColorEffectCnt; |
| int fCoverageEffectCnt; |
| }; |
| @@ -364,6 +373,7 @@ public: |
| GrDrawState* fDrawState; |
| SkMatrix fViewMatrix; |
| int fNumColorStages; |
| + bool fHasGeometryProcessor; |
| SkAutoSTArray<8, GrEffectStage::SavedCoordChange> fSavedCoordChanges; |
| }; |