| 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 | |
| mtklein | 72c9faa | 2015-01-09 10:06:39 -0800 | [diff] [blame] | 69 | const char* name() const SK_OVERRIDE { return "DistanceFieldTexture"; } |
| jvanverth@google.com | d830d13 | 2013-11-11 20:54:09 +0000 | [diff] [blame] | 70 | |
| joshualitt | 71c9260 | 2015-01-14 08:12:47 -0800 | [diff] [blame] | 71 | const Attribute* inPosition() const { return fInPosition; } |
| 72 | const Attribute* inColor() const { return fInColor; } |
| 73 | const Attribute* 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 | abb52a1 | 2015-01-13 15:02:10 -0800 | [diff] [blame] | 83 | virtual GrGLPrimitiveProcessor* createGLInstance(const GrBatchTracker& bt, |
| 84 | const GrGLCaps&) const SK_OVERRIDE; |
| jvanverth@google.com | d830d13 | 2013-11-11 20:54:09 +0000 | [diff] [blame] | 85 | |
| joshualitt | 4d8da81 | 2015-01-28 12:53:54 -0800 | [diff] [blame] | 86 | void initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const SK_OVERRIDE; |
| joshualitt | 9b98932 | 2014-12-15 14:16:27 -0800 | [diff] [blame] | 87 | |
| joshualitt | 290c09b | 2014-12-19 13:45:20 -0800 | [diff] [blame] | 88 | bool onCanMakeEqual(const GrBatchTracker&, |
| 89 | const GrGeometryProcessor&, |
| 90 | const GrBatchTracker&) const SK_OVERRIDE; |
| joshualitt | 9b98932 | 2014-12-15 14:16:27 -0800 | [diff] [blame] | 91 | |
| jvanverth@google.com | d830d13 | 2013-11-11 20:54:09 +0000 | [diff] [blame] | 92 | private: |
| joshualitt | 8059eb9 | 2014-12-29 15:10:07 -0800 | [diff] [blame] | 93 | GrDistanceFieldTextureEffect(GrColor, const SkMatrix& viewMatrix, GrTexture* texture, |
| 94 | const GrTextureParams& params, |
| jvanverth | 2d2a68c | 2014-06-10 06:42:56 -0700 | [diff] [blame] | 95 | #ifdef SK_GAMMA_APPLY_TO_A8 |
| 96 | GrTexture* gamma, const GrTextureParams& gammaParams, float lum, |
| 97 | #endif |
| joshualitt | 56995b5 | 2014-12-11 15:44:02 -0800 | [diff] [blame] | 98 | uint32_t flags, bool opaqueVertexColors); |
| jvanverth@google.com | d830d13 | 2013-11-11 20:54:09 +0000 | [diff] [blame] | 99 | |
| mtklein | 72c9faa | 2015-01-09 10:06:39 -0800 | [diff] [blame] | 100 | bool onIsEqual(const GrGeometryProcessor& other) const SK_OVERRIDE; |
| jvanverth@google.com | d830d13 | 2013-11-11 20:54:09 +0000 | [diff] [blame] | 101 | |
| mtklein | 72c9faa | 2015-01-09 10:06:39 -0800 | [diff] [blame] | 102 | void onGetInvariantOutputCoverage(GrInitInvariantOutput*) const SK_OVERRIDE; |
| egdaniel | 1a8ecdf | 2014-10-03 06:24:12 -0700 | [diff] [blame] | 103 | |
| joshualitt | 249af15 | 2014-09-15 11:41:13 -0700 | [diff] [blame] | 104 | GrTextureAccess fTextureAccess; |
| jvanverth | 2d2a68c | 2014-06-10 06:42:56 -0700 | [diff] [blame] | 105 | #ifdef SK_GAMMA_APPLY_TO_A8 |
| joshualitt | 249af15 | 2014-09-15 11:41:13 -0700 | [diff] [blame] | 106 | GrTextureAccess fGammaTextureAccess; |
| 107 | float fLuminance; |
| jvanverth | 2d2a68c | 2014-06-10 06:42:56 -0700 | [diff] [blame] | 108 | #endif |
| joshualitt | 249af15 | 2014-09-15 11:41:13 -0700 | [diff] [blame] | 109 | uint32_t fFlags; |
| joshualitt | 71c9260 | 2015-01-14 08:12:47 -0800 | [diff] [blame] | 110 | const Attribute* fInPosition; |
| 111 | const Attribute* fInColor; |
| 112 | const Attribute* fInTextureCoords; |
| jvanverth@google.com | d830d13 | 2013-11-11 20:54:09 +0000 | [diff] [blame] | 113 | |
| joshualitt | b0a8a37 | 2014-09-23 09:50:21 -0700 | [diff] [blame] | 114 | GR_DECLARE_GEOMETRY_PROCESSOR_TEST; |
| jvanverth@google.com | d830d13 | 2013-11-11 20:54:09 +0000 | [diff] [blame] | 115 | |
| jvanverth | fa38a30 | 2014-10-06 05:59:05 -0700 | [diff] [blame] | 116 | typedef GrGeometryProcessor INHERITED; |
| 117 | }; |
| 118 | |
| 119 | |
| 120 | /** |
| 121 | * The output color of this effect is a modulation of the input color and a sample from a |
| 122 | * distance field texture (using a smoothed step function near 0.5). |
| 123 | * It allows explicit specification of the filtering and wrap modes (GrTextureParams). The input |
| 124 | * coords are a custom attribute. No gamma correct blending is applied. |
| 125 | */ |
| 126 | class GrDistanceFieldNoGammaTextureEffect : public GrGeometryProcessor { |
| 127 | public: |
| joshualitt | 8059eb9 | 2014-12-29 15:10:07 -0800 | [diff] [blame] | 128 | static GrGeometryProcessor* Create(GrColor color, const SkMatrix& viewMatrix, GrTexture* tex, |
| 129 | const GrTextureParams& params, |
| joshualitt | 56995b5 | 2014-12-11 15:44:02 -0800 | [diff] [blame] | 130 | uint32_t flags, bool opaqueVertexColors) { |
| joshualitt | 8059eb9 | 2014-12-29 15:10:07 -0800 | [diff] [blame] | 131 | return SkNEW_ARGS(GrDistanceFieldNoGammaTextureEffect, (color, viewMatrix, tex, params, |
| 132 | flags, opaqueVertexColors)); |
| jvanverth | fa38a30 | 2014-10-06 05:59:05 -0700 | [diff] [blame] | 133 | } |
| 134 | |
| 135 | virtual ~GrDistanceFieldNoGammaTextureEffect() {} |
| 136 | |
| mtklein | 72c9faa | 2015-01-09 10:06:39 -0800 | [diff] [blame] | 137 | const char* name() const SK_OVERRIDE { return "DistanceFieldTexture"; } |
| jvanverth | fa38a30 | 2014-10-06 05:59:05 -0700 | [diff] [blame] | 138 | |
| joshualitt | 71c9260 | 2015-01-14 08:12:47 -0800 | [diff] [blame] | 139 | const Attribute* inPosition() const { return fInPosition; } |
| 140 | const Attribute* inColor() const { return fInColor; } |
| 141 | const Attribute* inTextureCoords() const { return fInTextureCoords; } |
| jvanverth | fa38a30 | 2014-10-06 05:59:05 -0700 | [diff] [blame] | 142 | uint32_t getFlags() const { return fFlags; } |
| 143 | |
| joshualitt | eb2a676 | 2014-12-04 11:35:33 -0800 | [diff] [blame] | 144 | virtual void getGLProcessorKey(const GrBatchTracker& bt, |
| 145 | const GrGLCaps& caps, |
| 146 | GrProcessorKeyBuilder* b) const SK_OVERRIDE; |
| jvanverth | fa38a30 | 2014-10-06 05:59:05 -0700 | [diff] [blame] | 147 | |
| joshualitt | abb52a1 | 2015-01-13 15:02:10 -0800 | [diff] [blame] | 148 | virtual GrGLPrimitiveProcessor* createGLInstance(const GrBatchTracker& bt, |
| 149 | const GrGLCaps&) const SK_OVERRIDE; |
| jvanverth | fa38a30 | 2014-10-06 05:59:05 -0700 | [diff] [blame] | 150 | |
| joshualitt | 4d8da81 | 2015-01-28 12:53:54 -0800 | [diff] [blame] | 151 | void initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const SK_OVERRIDE; |
| joshualitt | 9b98932 | 2014-12-15 14:16:27 -0800 | [diff] [blame] | 152 | |
| joshualitt | 290c09b | 2014-12-19 13:45:20 -0800 | [diff] [blame] | 153 | bool onCanMakeEqual(const GrBatchTracker&, |
| 154 | const GrGeometryProcessor&, |
| 155 | const GrBatchTracker&) const SK_OVERRIDE; |
| joshualitt | 9b98932 | 2014-12-15 14:16:27 -0800 | [diff] [blame] | 156 | |
| jvanverth | fa38a30 | 2014-10-06 05:59:05 -0700 | [diff] [blame] | 157 | private: |
| joshualitt | 8059eb9 | 2014-12-29 15:10:07 -0800 | [diff] [blame] | 158 | GrDistanceFieldNoGammaTextureEffect(GrColor, const SkMatrix& viewMatrix, GrTexture* texture, |
| 159 | const GrTextureParams& params, uint32_t flags, |
| 160 | bool opaqueVertexColors); |
| jvanverth | fa38a30 | 2014-10-06 05:59:05 -0700 | [diff] [blame] | 161 | |
| mtklein | 72c9faa | 2015-01-09 10:06:39 -0800 | [diff] [blame] | 162 | bool onIsEqual(const GrGeometryProcessor& other) const SK_OVERRIDE; |
| jvanverth | fa38a30 | 2014-10-06 05:59:05 -0700 | [diff] [blame] | 163 | |
| mtklein | 72c9faa | 2015-01-09 10:06:39 -0800 | [diff] [blame] | 164 | void onGetInvariantOutputCoverage(GrInitInvariantOutput*) const SK_OVERRIDE; |
| jvanverth | fa38a30 | 2014-10-06 05:59:05 -0700 | [diff] [blame] | 165 | |
| 166 | GrTextureAccess fTextureAccess; |
| 167 | uint32_t fFlags; |
| joshualitt | 71c9260 | 2015-01-14 08:12:47 -0800 | [diff] [blame] | 168 | const Attribute* fInPosition; |
| 169 | const Attribute* fInColor; |
| 170 | const Attribute* fInTextureCoords; |
| jvanverth | fa38a30 | 2014-10-06 05:59:05 -0700 | [diff] [blame] | 171 | |
| 172 | GR_DECLARE_GEOMETRY_PROCESSOR_TEST; |
| 173 | |
| 174 | typedef GrGeometryProcessor INHERITED; |
| jvanverth@google.com | d830d13 | 2013-11-11 20:54:09 +0000 | [diff] [blame] | 175 | }; |
| 176 | |
| commit-bot@chromium.org | 609ced4 | 2014-04-03 18:25:48 +0000 | [diff] [blame] | 177 | /** |
| 178 | * The output color of this effect is a modulation of the input color and samples from a |
| 179 | * distance field texture (using a smoothed step function near 0.5), adjusted for LCD displays. |
| 180 | * It allows explicit specification of the filtering and wrap modes (GrTextureParams). The input |
| jvanverth | 2d2a68c | 2014-06-10 06:42:56 -0700 | [diff] [blame] | 181 | * 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] | 182 | */ |
| joshualitt | 249af15 | 2014-09-15 11:41:13 -0700 | [diff] [blame] | 183 | class GrDistanceFieldLCDTextureEffect : public GrGeometryProcessor { |
| commit-bot@chromium.org | 609ced4 | 2014-04-03 18:25:48 +0000 | [diff] [blame] | 184 | public: |
| joshualitt | 8059eb9 | 2014-12-29 15:10:07 -0800 | [diff] [blame] | 185 | static GrGeometryProcessor* Create(GrColor color, const SkMatrix& viewMatrix, GrTexture* tex, |
| 186 | const GrTextureParams& params, GrTexture* gamma, |
| 187 | const GrTextureParams& gammaParams, |
| joshualitt | b0a8a37 | 2014-09-23 09:50:21 -0700 | [diff] [blame] | 188 | SkColor textColor, uint32_t flags) { |
| bsalomon | 55fad7a | 2014-07-08 07:34:20 -0700 | [diff] [blame] | 189 | return SkNEW_ARGS(GrDistanceFieldLCDTextureEffect, |
| joshualitt | 8059eb9 | 2014-12-29 15:10:07 -0800 | [diff] [blame] | 190 | (color, viewMatrix, tex, params, gamma, gammaParams, textColor, flags)); |
| commit-bot@chromium.org | 609ced4 | 2014-04-03 18:25:48 +0000 | [diff] [blame] | 191 | } |
| 192 | |
| 193 | virtual ~GrDistanceFieldLCDTextureEffect() {} |
| 194 | |
| mtklein | 72c9faa | 2015-01-09 10:06:39 -0800 | [diff] [blame] | 195 | const char* name() const SK_OVERRIDE { return "DistanceFieldLCDTexture"; } |
| commit-bot@chromium.org | 609ced4 | 2014-04-03 18:25:48 +0000 | [diff] [blame] | 196 | |
| joshualitt | 71c9260 | 2015-01-14 08:12:47 -0800 | [diff] [blame] | 197 | const Attribute* inPosition() const { return fInPosition; } |
| 198 | const Attribute* inTextureCoords() const { return fInTextureCoords; } |
| jvanverth | 2d2a68c | 2014-06-10 06:42:56 -0700 | [diff] [blame] | 199 | GrColor getTextColor() const { return fTextColor; } |
| jvanverth | 78f0718 | 2014-07-30 06:17:59 -0700 | [diff] [blame] | 200 | uint32_t getFlags() const { return fFlags; } |
| commit-bot@chromium.org | 609ced4 | 2014-04-03 18:25:48 +0000 | [diff] [blame] | 201 | |
| joshualitt | eb2a676 | 2014-12-04 11:35:33 -0800 | [diff] [blame] | 202 | virtual void getGLProcessorKey(const GrBatchTracker& bt, |
| 203 | const GrGLCaps& caps, |
| 204 | GrProcessorKeyBuilder* b) const SK_OVERRIDE; |
| commit-bot@chromium.org | 609ced4 | 2014-04-03 18:25:48 +0000 | [diff] [blame] | 205 | |
| joshualitt | abb52a1 | 2015-01-13 15:02:10 -0800 | [diff] [blame] | 206 | virtual GrGLPrimitiveProcessor* createGLInstance(const GrBatchTracker& bt, |
| 207 | const GrGLCaps&) const SK_OVERRIDE; |
| commit-bot@chromium.org | 609ced4 | 2014-04-03 18:25:48 +0000 | [diff] [blame] | 208 | |
| joshualitt | 4d8da81 | 2015-01-28 12:53:54 -0800 | [diff] [blame] | 209 | void initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const SK_OVERRIDE; |
| joshualitt | 9b98932 | 2014-12-15 14:16:27 -0800 | [diff] [blame] | 210 | |
| joshualitt | 290c09b | 2014-12-19 13:45:20 -0800 | [diff] [blame] | 211 | bool onCanMakeEqual(const GrBatchTracker&, |
| 212 | const GrGeometryProcessor&, |
| 213 | const GrBatchTracker&) const SK_OVERRIDE; |
| joshualitt | 9b98932 | 2014-12-15 14:16:27 -0800 | [diff] [blame] | 214 | |
| commit-bot@chromium.org | 609ced4 | 2014-04-03 18:25:48 +0000 | [diff] [blame] | 215 | private: |
| joshualitt | 8059eb9 | 2014-12-29 15:10:07 -0800 | [diff] [blame] | 216 | GrDistanceFieldLCDTextureEffect(GrColor, const SkMatrix& viewMatrix, GrTexture* texture, |
| 217 | const GrTextureParams& params, |
| jvanverth | 2d2a68c | 2014-06-10 06:42:56 -0700 | [diff] [blame] | 218 | GrTexture* gamma, const GrTextureParams& gammaParams, |
| joshualitt | 8059eb9 | 2014-12-29 15:10:07 -0800 | [diff] [blame] | 219 | SkColor textColor, uint32_t flags); |
| commit-bot@chromium.org | 609ced4 | 2014-04-03 18:25:48 +0000 | [diff] [blame] | 220 | |
| mtklein | 72c9faa | 2015-01-09 10:06:39 -0800 | [diff] [blame] | 221 | bool onIsEqual(const GrGeometryProcessor& other) const SK_OVERRIDE; |
| commit-bot@chromium.org | 609ced4 | 2014-04-03 18:25:48 +0000 | [diff] [blame] | 222 | |
| mtklein | 72c9faa | 2015-01-09 10:06:39 -0800 | [diff] [blame] | 223 | void onGetInvariantOutputCoverage(GrInitInvariantOutput*) const SK_OVERRIDE; |
| egdaniel | 1a8ecdf | 2014-10-03 06:24:12 -0700 | [diff] [blame] | 224 | |
| joshualitt | 249af15 | 2014-09-15 11:41:13 -0700 | [diff] [blame] | 225 | GrTextureAccess fTextureAccess; |
| 226 | GrTextureAccess fGammaTextureAccess; |
| 227 | GrColor fTextColor; |
| 228 | uint32_t fFlags; |
| joshualitt | 71c9260 | 2015-01-14 08:12:47 -0800 | [diff] [blame] | 229 | const Attribute* fInPosition; |
| 230 | const Attribute* fInTextureCoords; |
| commit-bot@chromium.org | 609ced4 | 2014-04-03 18:25:48 +0000 | [diff] [blame] | 231 | |
| joshualitt | b0a8a37 | 2014-09-23 09:50:21 -0700 | [diff] [blame] | 232 | GR_DECLARE_GEOMETRY_PROCESSOR_TEST; |
| commit-bot@chromium.org | 609ced4 | 2014-04-03 18:25:48 +0000 | [diff] [blame] | 233 | |
| jvanverth | fa38a30 | 2014-10-06 05:59:05 -0700 | [diff] [blame] | 234 | typedef GrGeometryProcessor INHERITED; |
| commit-bot@chromium.org | 609ced4 | 2014-04-03 18:25:48 +0000 | [diff] [blame] | 235 | }; |
| 236 | |
| jvanverth@google.com | d830d13 | 2013-11-11 20:54:09 +0000 | [diff] [blame] | 237 | #endif |