jvanverth@google.com | d830d13 | 2013-11-11 20:54:09 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2013 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
| 8 | #ifndef GrDistanceFieldTextureEffect_DEFINED |
| 9 | #define GrDistanceFieldTextureEffect_DEFINED |
| 10 | |
joshualitt | b0a8a37 | 2014-09-23 09:50:21 -0700 | [diff] [blame] | 11 | #include "GrProcessor.h" |
joshualitt | 249af15 | 2014-09-15 11:41:13 -0700 | [diff] [blame] | 12 | #include "GrGeometryProcessor.h" |
jvanverth@google.com | d830d13 | 2013-11-11 20:54:09 +0000 | [diff] [blame] | 13 | |
| 14 | class GrGLDistanceFieldTextureEffect; |
jvanverth | fa38a30 | 2014-10-06 05:59:05 -0700 | [diff] [blame] | 15 | class GrGLDistanceFieldNoGammaTextureEffect; |
commit-bot@chromium.org | 609ced4 | 2014-04-03 18:25:48 +0000 | [diff] [blame] | 16 | class GrGLDistanceFieldLCDTextureEffect; |
egdaniel | 605dd0f | 2014-11-12 08:35:25 -0800 | [diff] [blame] | 17 | class GrInvariantOutput; |
jvanverth@google.com | d830d13 | 2013-11-11 20:54:09 +0000 | [diff] [blame] | 18 | |
jvanverth | 78f0718 | 2014-07-30 06:17:59 -0700 | [diff] [blame] | 19 | enum GrDistanceFieldEffectFlags { |
| 20 | kSimilarity_DistanceFieldEffectFlag = 0x01, // ctm is similarity matrix |
| 21 | kRectToRect_DistanceFieldEffectFlag = 0x02, // ctm maps rects to rects |
| 22 | kUseLCD_DistanceFieldEffectFlag = 0x04, // use lcd text |
| 23 | kBGR_DistanceFieldEffectFlag = 0x08, // lcd display has bgr order |
| 24 | kPortrait_DistanceFieldEffectFlag = 0x10, // lcd display is in portrait mode (not used yet) |
joshualitt | 2dd1ae0 | 2014-12-03 06:24:10 -0800 | [diff] [blame] | 25 | kColorAttr_DistanceFieldEffectFlag = 0x20, // color vertex attribute |
jvanverth | 6d22eca | 2014-10-28 11:10:48 -0700 | [diff] [blame] | 26 | |
| 27 | kInvalid_DistanceFieldEffectFlag = 0x80, // invalid state (for initialization) |
jvanverth | 78f0718 | 2014-07-30 06:17:59 -0700 | [diff] [blame] | 28 | |
| 29 | kUniformScale_DistanceFieldEffectMask = kSimilarity_DistanceFieldEffectFlag | |
| 30 | kRectToRect_DistanceFieldEffectFlag, |
| 31 | // The subset of the flags relevant to GrDistanceFieldTextureEffect |
joshualitt | 2dd1ae0 | 2014-12-03 06:24:10 -0800 | [diff] [blame] | 32 | kNonLCD_DistanceFieldEffectMask = kSimilarity_DistanceFieldEffectFlag | |
| 33 | kColorAttr_DistanceFieldEffectFlag, |
jvanverth | 78f0718 | 2014-07-30 06:17:59 -0700 | [diff] [blame] | 34 | // The subset of the flags relevant to GrDistanceFieldLCDTextureEffect |
| 35 | kLCD_DistanceFieldEffectMask = kSimilarity_DistanceFieldEffectFlag | |
| 36 | kRectToRect_DistanceFieldEffectFlag | |
| 37 | kUseLCD_DistanceFieldEffectFlag | |
| 38 | kBGR_DistanceFieldEffectFlag, |
| 39 | }; |
| 40 | |
jvanverth@google.com | d830d13 | 2013-11-11 20:54:09 +0000 | [diff] [blame] | 41 | /** |
skia.committer@gmail.com | 11a253b | 2013-11-12 07:02:05 +0000 | [diff] [blame] | 42 | * The output color of this effect is a modulation of the input color and a sample from a |
jvanverth@google.com | d830d13 | 2013-11-11 20:54:09 +0000 | [diff] [blame] | 43 | * distance field texture (using a smoothed step function near 0.5). |
| 44 | * It allows explicit specification of the filtering and wrap modes (GrTextureParams). The input |
jvanverth | 2d2a68c | 2014-06-10 06:42:56 -0700 | [diff] [blame] | 45 | * coords are a custom attribute. Gamma correction is handled via a texture LUT. |
jvanverth@google.com | d830d13 | 2013-11-11 20:54:09 +0000 | [diff] [blame] | 46 | */ |
joshualitt | 249af15 | 2014-09-15 11:41:13 -0700 | [diff] [blame] | 47 | class GrDistanceFieldTextureEffect : public GrGeometryProcessor { |
jvanverth@google.com | d830d13 | 2013-11-11 20:54:09 +0000 | [diff] [blame] | 48 | public: |
jvanverth | 2d2a68c | 2014-06-10 06:42:56 -0700 | [diff] [blame] | 49 | #ifdef SK_GAMMA_APPLY_TO_A8 |
joshualitt | 8059eb9 | 2014-12-29 15:10:07 -0800 | [diff] [blame^] | 50 | static GrGeometryProcessor* Create(GrColor color, const SkMatrix& viewMatrix, GrTexture* tex, |
| 51 | const GrTextureParams& params, |
joshualitt | b0a8a37 | 2014-09-23 09:50:21 -0700 | [diff] [blame] | 52 | GrTexture* gamma, const GrTextureParams& gammaParams, |
joshualitt | 56995b5 | 2014-12-11 15:44:02 -0800 | [diff] [blame] | 53 | float lum, uint32_t flags, bool opaqueVertexColors) { |
joshualitt | 8059eb9 | 2014-12-29 15:10:07 -0800 | [diff] [blame^] | 54 | return SkNEW_ARGS(GrDistanceFieldTextureEffect, (color, viewMatrix, tex, params, gamma, |
| 55 | gammaParams, lum, |
joshualitt | 56995b5 | 2014-12-11 15:44:02 -0800 | [diff] [blame] | 56 | flags, opaqueVertexColors)); |
bsalomon | 55fad7a | 2014-07-08 07:34:20 -0700 | [diff] [blame] | 57 | } |
jvanverth | 2d2a68c | 2014-06-10 06:42:56 -0700 | [diff] [blame] | 58 | #else |
joshualitt | 8059eb9 | 2014-12-29 15:10:07 -0800 | [diff] [blame^] | 59 | static GrGeometryProcessor* Create(GrColor color, const SkMatrix& viewMatrix, GrTexture* tex, |
| 60 | const GrTextureParams& params, |
joshualitt | 56995b5 | 2014-12-11 15:44:02 -0800 | [diff] [blame] | 61 | uint32_t flags, bool opaqueVertexColors) { |
joshualitt | 8059eb9 | 2014-12-29 15:10:07 -0800 | [diff] [blame^] | 62 | return SkNEW_ARGS(GrDistanceFieldTextureEffect, (color, viewMatrix, tex, params, flags, |
joshualitt | 56995b5 | 2014-12-11 15:44:02 -0800 | [diff] [blame] | 63 | opaqueVertexColors)); |
jvanverth@google.com | d830d13 | 2013-11-11 20:54:09 +0000 | [diff] [blame] | 64 | } |
bsalomon | 55fad7a | 2014-07-08 07:34:20 -0700 | [diff] [blame] | 65 | #endif |
jvanverth@google.com | d830d13 | 2013-11-11 20:54:09 +0000 | [diff] [blame] | 66 | |
| 67 | virtual ~GrDistanceFieldTextureEffect() {} |
| 68 | |
joshualitt | eb2a676 | 2014-12-04 11:35:33 -0800 | [diff] [blame] | 69 | virtual const char* name() const SK_OVERRIDE { return "DistanceFieldTexture"; } |
jvanverth@google.com | d830d13 | 2013-11-11 20:54:09 +0000 | [diff] [blame] | 70 | |
joshualitt | 2dd1ae0 | 2014-12-03 06:24:10 -0800 | [diff] [blame] | 71 | const GrAttribute* inPosition() const { return fInPosition; } |
| 72 | const GrAttribute* inColor() const { return fInColor; } |
| 73 | const GrAttribute* inTextureCoords() const { return fInTextureCoords; } |
jvanverth | 2d2a68c | 2014-06-10 06:42:56 -0700 | [diff] [blame] | 74 | #ifdef SK_GAMMA_APPLY_TO_A8 |
| 75 | float getLuminance() const { return fLuminance; } |
| 76 | #endif |
jvanverth | 78f0718 | 2014-07-30 06:17:59 -0700 | [diff] [blame] | 77 | uint32_t getFlags() const { return fFlags; } |
jvanverth@google.com | d830d13 | 2013-11-11 20:54:09 +0000 | [diff] [blame] | 78 | |
joshualitt | eb2a676 | 2014-12-04 11:35:33 -0800 | [diff] [blame] | 79 | virtual void getGLProcessorKey(const GrBatchTracker& bt, |
| 80 | const GrGLCaps& caps, |
| 81 | GrProcessorKeyBuilder* b) const SK_OVERRIDE; |
jvanverth@google.com | d830d13 | 2013-11-11 20:54:09 +0000 | [diff] [blame] | 82 | |
joshualitt | eb2a676 | 2014-12-04 11:35:33 -0800 | [diff] [blame] | 83 | virtual GrGLGeometryProcessor* createGLInstance(const GrBatchTracker& bt) const SK_OVERRIDE; |
jvanverth@google.com | d830d13 | 2013-11-11 20:54:09 +0000 | [diff] [blame] | 84 | |
joshualitt | 9b98932 | 2014-12-15 14:16:27 -0800 | [diff] [blame] | 85 | void initBatchTracker(GrBatchTracker* bt, const InitBT& init) const SK_OVERRIDE; |
| 86 | |
joshualitt | 290c09b | 2014-12-19 13:45:20 -0800 | [diff] [blame] | 87 | bool onCanMakeEqual(const GrBatchTracker&, |
| 88 | const GrGeometryProcessor&, |
| 89 | const GrBatchTracker&) const SK_OVERRIDE; |
joshualitt | 9b98932 | 2014-12-15 14:16:27 -0800 | [diff] [blame] | 90 | |
jvanverth@google.com | d830d13 | 2013-11-11 20:54:09 +0000 | [diff] [blame] | 91 | private: |
joshualitt | 8059eb9 | 2014-12-29 15:10:07 -0800 | [diff] [blame^] | 92 | GrDistanceFieldTextureEffect(GrColor, const SkMatrix& viewMatrix, GrTexture* texture, |
| 93 | const GrTextureParams& params, |
jvanverth | 2d2a68c | 2014-06-10 06:42:56 -0700 | [diff] [blame] | 94 | #ifdef SK_GAMMA_APPLY_TO_A8 |
| 95 | GrTexture* gamma, const GrTextureParams& gammaParams, float lum, |
| 96 | #endif |
joshualitt | 56995b5 | 2014-12-11 15:44:02 -0800 | [diff] [blame] | 97 | uint32_t flags, bool opaqueVertexColors); |
jvanverth@google.com | d830d13 | 2013-11-11 20:54:09 +0000 | [diff] [blame] | 98 | |
bsalomon | 0e08fc1 | 2014-10-15 08:19:04 -0700 | [diff] [blame] | 99 | virtual bool onIsEqual(const GrGeometryProcessor& other) const SK_OVERRIDE; |
jvanverth@google.com | d830d13 | 2013-11-11 20:54:09 +0000 | [diff] [blame] | 100 | |
joshualitt | 56995b5 | 2014-12-11 15:44:02 -0800 | [diff] [blame] | 101 | virtual void onGetInvariantOutputCoverage(GrInitInvariantOutput*) const SK_OVERRIDE; |
egdaniel | 1a8ecdf | 2014-10-03 06:24:12 -0700 | [diff] [blame] | 102 | |
joshualitt | 249af15 | 2014-09-15 11:41:13 -0700 | [diff] [blame] | 103 | GrTextureAccess fTextureAccess; |
jvanverth | 2d2a68c | 2014-06-10 06:42:56 -0700 | [diff] [blame] | 104 | #ifdef SK_GAMMA_APPLY_TO_A8 |
joshualitt | 249af15 | 2014-09-15 11:41:13 -0700 | [diff] [blame] | 105 | GrTextureAccess fGammaTextureAccess; |
| 106 | float fLuminance; |
jvanverth | 2d2a68c | 2014-06-10 06:42:56 -0700 | [diff] [blame] | 107 | #endif |
joshualitt | 249af15 | 2014-09-15 11:41:13 -0700 | [diff] [blame] | 108 | uint32_t fFlags; |
joshualitt | 2dd1ae0 | 2014-12-03 06:24:10 -0800 | [diff] [blame] | 109 | const GrAttribute* fInPosition; |
| 110 | const GrAttribute* fInColor; |
| 111 | const GrAttribute* fInTextureCoords; |
jvanverth@google.com | d830d13 | 2013-11-11 20:54:09 +0000 | [diff] [blame] | 112 | |
joshualitt | b0a8a37 | 2014-09-23 09:50:21 -0700 | [diff] [blame] | 113 | GR_DECLARE_GEOMETRY_PROCESSOR_TEST; |
jvanverth@google.com | d830d13 | 2013-11-11 20:54:09 +0000 | [diff] [blame] | 114 | |
jvanverth | fa38a30 | 2014-10-06 05:59:05 -0700 | [diff] [blame] | 115 | typedef GrGeometryProcessor INHERITED; |
| 116 | }; |
| 117 | |
| 118 | |
| 119 | /** |
| 120 | * The output color of this effect is a modulation of the input color and a sample from a |
| 121 | * distance field texture (using a smoothed step function near 0.5). |
| 122 | * It allows explicit specification of the filtering and wrap modes (GrTextureParams). The input |
| 123 | * coords are a custom attribute. No gamma correct blending is applied. |
| 124 | */ |
| 125 | class GrDistanceFieldNoGammaTextureEffect : public GrGeometryProcessor { |
| 126 | public: |
joshualitt | 8059eb9 | 2014-12-29 15:10:07 -0800 | [diff] [blame^] | 127 | static GrGeometryProcessor* Create(GrColor color, const SkMatrix& viewMatrix, GrTexture* tex, |
| 128 | const GrTextureParams& params, |
joshualitt | 56995b5 | 2014-12-11 15:44:02 -0800 | [diff] [blame] | 129 | uint32_t flags, bool opaqueVertexColors) { |
joshualitt | 8059eb9 | 2014-12-29 15:10:07 -0800 | [diff] [blame^] | 130 | return SkNEW_ARGS(GrDistanceFieldNoGammaTextureEffect, (color, viewMatrix, tex, params, |
| 131 | flags, opaqueVertexColors)); |
jvanverth | fa38a30 | 2014-10-06 05:59:05 -0700 | [diff] [blame] | 132 | } |
| 133 | |
| 134 | virtual ~GrDistanceFieldNoGammaTextureEffect() {} |
| 135 | |
joshualitt | eb2a676 | 2014-12-04 11:35:33 -0800 | [diff] [blame] | 136 | virtual const char* name() const SK_OVERRIDE { return "DistanceFieldTexture"; } |
jvanverth | fa38a30 | 2014-10-06 05:59:05 -0700 | [diff] [blame] | 137 | |
joshualitt | 2dd1ae0 | 2014-12-03 06:24:10 -0800 | [diff] [blame] | 138 | const GrAttribute* inPosition() const { return fInPosition; } |
| 139 | const GrAttribute* inColor() const { return fInColor; } |
| 140 | const GrAttribute* inTextureCoords() const { return fInTextureCoords; } |
jvanverth | fa38a30 | 2014-10-06 05:59:05 -0700 | [diff] [blame] | 141 | uint32_t getFlags() const { return fFlags; } |
| 142 | |
joshualitt | eb2a676 | 2014-12-04 11:35:33 -0800 | [diff] [blame] | 143 | virtual void getGLProcessorKey(const GrBatchTracker& bt, |
| 144 | const GrGLCaps& caps, |
| 145 | GrProcessorKeyBuilder* b) const SK_OVERRIDE; |
jvanverth | fa38a30 | 2014-10-06 05:59:05 -0700 | [diff] [blame] | 146 | |
joshualitt | eb2a676 | 2014-12-04 11:35:33 -0800 | [diff] [blame] | 147 | virtual GrGLGeometryProcessor* createGLInstance(const GrBatchTracker& bt) const SK_OVERRIDE; |
jvanverth | fa38a30 | 2014-10-06 05:59:05 -0700 | [diff] [blame] | 148 | |
joshualitt | 9b98932 | 2014-12-15 14:16:27 -0800 | [diff] [blame] | 149 | void initBatchTracker(GrBatchTracker* bt, const InitBT& init) const SK_OVERRIDE; |
| 150 | |
joshualitt | 290c09b | 2014-12-19 13:45:20 -0800 | [diff] [blame] | 151 | bool onCanMakeEqual(const GrBatchTracker&, |
| 152 | const GrGeometryProcessor&, |
| 153 | const GrBatchTracker&) const SK_OVERRIDE; |
joshualitt | 9b98932 | 2014-12-15 14:16:27 -0800 | [diff] [blame] | 154 | |
jvanverth | fa38a30 | 2014-10-06 05:59:05 -0700 | [diff] [blame] | 155 | private: |
joshualitt | 8059eb9 | 2014-12-29 15:10:07 -0800 | [diff] [blame^] | 156 | GrDistanceFieldNoGammaTextureEffect(GrColor, const SkMatrix& viewMatrix, GrTexture* texture, |
| 157 | const GrTextureParams& params, uint32_t flags, |
| 158 | bool opaqueVertexColors); |
jvanverth | fa38a30 | 2014-10-06 05:59:05 -0700 | [diff] [blame] | 159 | |
bsalomon | 0e08fc1 | 2014-10-15 08:19:04 -0700 | [diff] [blame] | 160 | virtual bool onIsEqual(const GrGeometryProcessor& other) const SK_OVERRIDE; |
jvanverth | fa38a30 | 2014-10-06 05:59:05 -0700 | [diff] [blame] | 161 | |
joshualitt | 56995b5 | 2014-12-11 15:44:02 -0800 | [diff] [blame] | 162 | virtual void onGetInvariantOutputCoverage(GrInitInvariantOutput*) const SK_OVERRIDE; |
jvanverth | fa38a30 | 2014-10-06 05:59:05 -0700 | [diff] [blame] | 163 | |
| 164 | GrTextureAccess fTextureAccess; |
| 165 | uint32_t fFlags; |
joshualitt | 2dd1ae0 | 2014-12-03 06:24:10 -0800 | [diff] [blame] | 166 | const GrAttribute* fInPosition; |
| 167 | const GrAttribute* fInColor; |
| 168 | const GrAttribute* fInTextureCoords; |
jvanverth | fa38a30 | 2014-10-06 05:59:05 -0700 | [diff] [blame] | 169 | |
| 170 | GR_DECLARE_GEOMETRY_PROCESSOR_TEST; |
| 171 | |
| 172 | typedef GrGeometryProcessor INHERITED; |
jvanverth@google.com | d830d13 | 2013-11-11 20:54:09 +0000 | [diff] [blame] | 173 | }; |
| 174 | |
commit-bot@chromium.org | 609ced4 | 2014-04-03 18:25:48 +0000 | [diff] [blame] | 175 | /** |
| 176 | * The output color of this effect is a modulation of the input color and samples from a |
| 177 | * distance field texture (using a smoothed step function near 0.5), adjusted for LCD displays. |
| 178 | * It allows explicit specification of the filtering and wrap modes (GrTextureParams). The input |
jvanverth | 2d2a68c | 2014-06-10 06:42:56 -0700 | [diff] [blame] | 179 | * coords are a custom attribute. Gamma correction is handled via a texture LUT. |
commit-bot@chromium.org | 609ced4 | 2014-04-03 18:25:48 +0000 | [diff] [blame] | 180 | */ |
joshualitt | 249af15 | 2014-09-15 11:41:13 -0700 | [diff] [blame] | 181 | class GrDistanceFieldLCDTextureEffect : public GrGeometryProcessor { |
commit-bot@chromium.org | 609ced4 | 2014-04-03 18:25:48 +0000 | [diff] [blame] | 182 | public: |
joshualitt | 8059eb9 | 2014-12-29 15:10:07 -0800 | [diff] [blame^] | 183 | static GrGeometryProcessor* Create(GrColor color, const SkMatrix& viewMatrix, GrTexture* tex, |
| 184 | const GrTextureParams& params, GrTexture* gamma, |
| 185 | const GrTextureParams& gammaParams, |
joshualitt | b0a8a37 | 2014-09-23 09:50:21 -0700 | [diff] [blame] | 186 | SkColor textColor, uint32_t flags) { |
bsalomon | 55fad7a | 2014-07-08 07:34:20 -0700 | [diff] [blame] | 187 | return SkNEW_ARGS(GrDistanceFieldLCDTextureEffect, |
joshualitt | 8059eb9 | 2014-12-29 15:10:07 -0800 | [diff] [blame^] | 188 | (color, viewMatrix, tex, params, gamma, gammaParams, textColor, flags)); |
commit-bot@chromium.org | 609ced4 | 2014-04-03 18:25:48 +0000 | [diff] [blame] | 189 | } |
| 190 | |
| 191 | virtual ~GrDistanceFieldLCDTextureEffect() {} |
| 192 | |
joshualitt | eb2a676 | 2014-12-04 11:35:33 -0800 | [diff] [blame] | 193 | virtual const char* name() const SK_OVERRIDE { return "DistanceFieldLCDTexture"; } |
commit-bot@chromium.org | 609ced4 | 2014-04-03 18:25:48 +0000 | [diff] [blame] | 194 | |
joshualitt | 2dd1ae0 | 2014-12-03 06:24:10 -0800 | [diff] [blame] | 195 | const GrAttribute* inPosition() const { return fInPosition; } |
| 196 | const GrAttribute* inTextureCoords() const { return fInTextureCoords; } |
jvanverth | 2d2a68c | 2014-06-10 06:42:56 -0700 | [diff] [blame] | 197 | GrColor getTextColor() const { return fTextColor; } |
jvanverth | 78f0718 | 2014-07-30 06:17:59 -0700 | [diff] [blame] | 198 | uint32_t getFlags() const { return fFlags; } |
commit-bot@chromium.org | 609ced4 | 2014-04-03 18:25:48 +0000 | [diff] [blame] | 199 | |
joshualitt | eb2a676 | 2014-12-04 11:35:33 -0800 | [diff] [blame] | 200 | virtual void getGLProcessorKey(const GrBatchTracker& bt, |
| 201 | const GrGLCaps& caps, |
| 202 | GrProcessorKeyBuilder* b) const SK_OVERRIDE; |
commit-bot@chromium.org | 609ced4 | 2014-04-03 18:25:48 +0000 | [diff] [blame] | 203 | |
joshualitt | eb2a676 | 2014-12-04 11:35:33 -0800 | [diff] [blame] | 204 | virtual GrGLGeometryProcessor* createGLInstance(const GrBatchTracker& bt) const SK_OVERRIDE; |
commit-bot@chromium.org | 609ced4 | 2014-04-03 18:25:48 +0000 | [diff] [blame] | 205 | |
joshualitt | 9b98932 | 2014-12-15 14:16:27 -0800 | [diff] [blame] | 206 | void initBatchTracker(GrBatchTracker* bt, const InitBT& init) const SK_OVERRIDE; |
| 207 | |
joshualitt | 290c09b | 2014-12-19 13:45:20 -0800 | [diff] [blame] | 208 | bool onCanMakeEqual(const GrBatchTracker&, |
| 209 | const GrGeometryProcessor&, |
| 210 | const GrBatchTracker&) const SK_OVERRIDE; |
joshualitt | 9b98932 | 2014-12-15 14:16:27 -0800 | [diff] [blame] | 211 | |
commit-bot@chromium.org | 609ced4 | 2014-04-03 18:25:48 +0000 | [diff] [blame] | 212 | private: |
joshualitt | 8059eb9 | 2014-12-29 15:10:07 -0800 | [diff] [blame^] | 213 | GrDistanceFieldLCDTextureEffect(GrColor, const SkMatrix& viewMatrix, GrTexture* texture, |
| 214 | const GrTextureParams& params, |
jvanverth | 2d2a68c | 2014-06-10 06:42:56 -0700 | [diff] [blame] | 215 | GrTexture* gamma, const GrTextureParams& gammaParams, |
joshualitt | 8059eb9 | 2014-12-29 15:10:07 -0800 | [diff] [blame^] | 216 | SkColor textColor, uint32_t flags); |
commit-bot@chromium.org | 609ced4 | 2014-04-03 18:25:48 +0000 | [diff] [blame] | 217 | |
bsalomon | 0e08fc1 | 2014-10-15 08:19:04 -0700 | [diff] [blame] | 218 | virtual bool onIsEqual(const GrGeometryProcessor& other) const SK_OVERRIDE; |
commit-bot@chromium.org | 609ced4 | 2014-04-03 18:25:48 +0000 | [diff] [blame] | 219 | |
joshualitt | 56995b5 | 2014-12-11 15:44:02 -0800 | [diff] [blame] | 220 | virtual void onGetInvariantOutputCoverage(GrInitInvariantOutput*) const SK_OVERRIDE; |
egdaniel | 1a8ecdf | 2014-10-03 06:24:12 -0700 | [diff] [blame] | 221 | |
joshualitt | 249af15 | 2014-09-15 11:41:13 -0700 | [diff] [blame] | 222 | GrTextureAccess fTextureAccess; |
| 223 | GrTextureAccess fGammaTextureAccess; |
| 224 | GrColor fTextColor; |
| 225 | uint32_t fFlags; |
joshualitt | 2dd1ae0 | 2014-12-03 06:24:10 -0800 | [diff] [blame] | 226 | const GrAttribute* fInPosition; |
| 227 | const GrAttribute* fInTextureCoords; |
commit-bot@chromium.org | 609ced4 | 2014-04-03 18:25:48 +0000 | [diff] [blame] | 228 | |
joshualitt | b0a8a37 | 2014-09-23 09:50:21 -0700 | [diff] [blame] | 229 | GR_DECLARE_GEOMETRY_PROCESSOR_TEST; |
commit-bot@chromium.org | 609ced4 | 2014-04-03 18:25:48 +0000 | [diff] [blame] | 230 | |
jvanverth | fa38a30 | 2014-10-06 05:59:05 -0700 | [diff] [blame] | 231 | typedef GrGeometryProcessor INHERITED; |
commit-bot@chromium.org | 609ced4 | 2014-04-03 18:25:48 +0000 | [diff] [blame] | 232 | }; |
| 233 | |
jvanverth@google.com | d830d13 | 2013-11-11 20:54:09 +0000 | [diff] [blame] | 234 | #endif |