commit-bot@chromium.org | 907fbd5 | 2013-12-09 17:03:02 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2012 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 GrTextureDomainEffect_DEFINED |
| 9 | #define GrTextureDomainEffect_DEFINED |
| 10 | |
Brian Salomon | 6cd51b5 | 2017-07-26 19:07:15 -0400 | [diff] [blame] | 11 | #include "GrCoordTransform.h" |
| 12 | #include "GrFragmentProcessor.h" |
| 13 | #include "GrColorSpaceXform.h" |
egdaniel | 64c4728 | 2015-11-13 06:54:19 -0800 | [diff] [blame] | 14 | #include "glsl/GrGLSLFragmentProcessor.h" |
egdaniel | 018fb62 | 2015-10-28 07:26:40 -0700 | [diff] [blame] | 15 | #include "glsl/GrGLSLProgramDataManager.h" |
commit-bot@chromium.org | 907fbd5 | 2013-12-09 17:03:02 +0000 | [diff] [blame] | 16 | |
joshualitt | 30ba436 | 2014-08-21 20:18:45 -0700 | [diff] [blame] | 17 | class GrGLProgramBuilder; |
Brian Osman | c468963 | 2016-12-19 17:04:59 -0500 | [diff] [blame] | 18 | class GrGLSLColorSpaceXformHelper; |
egdaniel | 2d721d3 | 2015-11-11 13:06:05 -0800 | [diff] [blame] | 19 | class GrGLSLShaderBuilder; |
egdaniel | 605dd0f | 2014-11-12 08:35:25 -0800 | [diff] [blame] | 20 | class GrInvariantOutput; |
egdaniel | 7ea439b | 2015-12-03 09:20:44 -0800 | [diff] [blame] | 21 | class GrGLSLUniformHandler; |
commit-bot@chromium.org | 907fbd5 | 2013-12-09 17:03:02 +0000 | [diff] [blame] | 22 | struct SkRect; |
| 23 | |
| 24 | /** |
| 25 | * Limits a texture's lookup coordinates to a domain. Samples outside the domain are either clamped |
Ethan Nicholas | 5af9ea3 | 2017-07-28 15:19:46 -0400 | [diff] [blame] | 26 | * the edge of the domain or result in a float4 of zeros (decal mode). The domain is clipped to |
commit-bot@chromium.org | 907fbd5 | 2013-12-09 17:03:02 +0000 | [diff] [blame] | 27 | * normalized texture coords ([0,1]x[0,1] square). Bilinear filtering can cause texels outside the |
| 28 | * domain to affect the read value unless the caller considers this when calculating the domain. |
| 29 | */ |
| 30 | class GrTextureDomain { |
| 31 | public: |
| 32 | enum Mode { |
joshualitt | 5ae5fc5 | 2014-07-29 12:59:27 -0700 | [diff] [blame] | 33 | // Ignore the texture domain rectangle. |
| 34 | kIgnore_Mode, |
| 35 | // Clamp texture coords to the domain rectangle. |
| 36 | kClamp_Mode, |
| 37 | // Treat the area outside the domain rectangle as fully transparent. |
| 38 | kDecal_Mode, |
| 39 | // Wrap texture coordinates. NOTE: filtering may not work as expected because Bilerp will |
| 40 | // read texels outside of the domain. We could perform additional texture reads and filter |
| 41 | // in the shader, but are not currently doing this for performance reasons |
| 42 | kRepeat_Mode, |
commit-bot@chromium.org | 907fbd5 | 2013-12-09 17:03:02 +0000 | [diff] [blame] | 43 | |
joshualitt | 5ae5fc5 | 2014-07-29 12:59:27 -0700 | [diff] [blame] | 44 | kLastMode = kRepeat_Mode |
commit-bot@chromium.org | 907fbd5 | 2013-12-09 17:03:02 +0000 | [diff] [blame] | 45 | }; |
| 46 | static const int kModeCount = kLastMode + 1; |
| 47 | |
commit-bot@chromium.org | 7d7f314 | 2013-12-16 15:18:11 +0000 | [diff] [blame] | 48 | static const GrTextureDomain& IgnoredDomain() { |
Robert Phillips | 40fd7c9 | 2017-01-30 08:06:27 -0500 | [diff] [blame] | 49 | static const GrTextureDomain gDomain((GrTextureProxy*)nullptr, |
| 50 | SkRect::MakeEmpty(), kIgnore_Mode); |
commit-bot@chromium.org | 7d7f314 | 2013-12-16 15:18:11 +0000 | [diff] [blame] | 51 | return gDomain; |
| 52 | } |
| 53 | |
commit-bot@chromium.org | 907fbd5 | 2013-12-09 17:03:02 +0000 | [diff] [blame] | 54 | /** |
| 55 | * @param index Pass a value >= 0 if using multiple texture domains in the same effect. |
| 56 | * It is used to keep inserted variables from causing name collisions. |
| 57 | */ |
Robert Phillips | 40fd7c9 | 2017-01-30 08:06:27 -0500 | [diff] [blame] | 58 | GrTextureDomain(GrTextureProxy*, const SkRect& domain, Mode, int index = -1); |
| 59 | |
Brian Salomon | ffc2ec4 | 2017-07-25 14:59:03 -0400 | [diff] [blame] | 60 | GrTextureDomain(const GrTextureDomain&) = default; |
| 61 | |
commit-bot@chromium.org | 907fbd5 | 2013-12-09 17:03:02 +0000 | [diff] [blame] | 62 | const SkRect& domain() const { return fDomain; } |
| 63 | Mode mode() const { return fMode; } |
| 64 | |
| 65 | /* Computes a domain that bounds all the texels in texelRect. Note that with bilerp enabled |
| 66 | texels neighboring the domain may be read. */ |
Robert Phillips | e98234f | 2017-01-09 14:23:59 -0500 | [diff] [blame] | 67 | static const SkRect MakeTexelDomain(const SkIRect& texelRect) { |
| 68 | return SkRect::Make(texelRect); |
commit-bot@chromium.org | 907fbd5 | 2013-12-09 17:03:02 +0000 | [diff] [blame] | 69 | } |
| 70 | |
Robert Phillips | e98234f | 2017-01-09 14:23:59 -0500 | [diff] [blame] | 71 | static const SkRect MakeTexelDomainForMode(const SkIRect& texelRect, Mode mode) { |
senorblanco | d0d37ca | 2015-04-02 04:54:56 -0700 | [diff] [blame] | 72 | // For Clamp mode, inset by half a texel. |
senorblanco | d0d37ca | 2015-04-02 04:54:56 -0700 | [diff] [blame] | 73 | SkScalar inset = (mode == kClamp_Mode && !texelRect.isEmpty()) ? SK_ScalarHalf : 0; |
Robert Phillips | e98234f | 2017-01-09 14:23:59 -0500 | [diff] [blame] | 74 | return SkRect::MakeLTRB(texelRect.fLeft + inset, texelRect.fTop + inset, |
| 75 | texelRect.fRight - inset, texelRect.fBottom - inset); |
senorblanco | d0d37ca | 2015-04-02 04:54:56 -0700 | [diff] [blame] | 76 | } |
| 77 | |
Brian Salomon | 2ebd0c8 | 2016-10-03 17:15:28 -0400 | [diff] [blame] | 78 | bool operator==(const GrTextureDomain& that) const { |
egdaniel | 01a492f | 2014-08-21 06:47:50 -0700 | [diff] [blame] | 79 | return fMode == that.fMode && (kIgnore_Mode == fMode || fDomain == that.fDomain); |
commit-bot@chromium.org | 907fbd5 | 2013-12-09 17:03:02 +0000 | [diff] [blame] | 80 | } |
| 81 | |
| 82 | /** |
egdaniel | 64c4728 | 2015-11-13 06:54:19 -0800 | [diff] [blame] | 83 | * A GrGLSLFragmentProcessor subclass that corresponds to a GrProcessor subclass that uses |
egdaniel | 7dc4bd0 | 2015-10-29 07:57:01 -0700 | [diff] [blame] | 84 | * GrTextureDomain should include this helper. It generates the texture domain GLSL, produces |
| 85 | * the part of the effect key that reflects the texture domain code, and performs the uniform |
| 86 | * uploads necessary for texture domains. |
commit-bot@chromium.org | 907fbd5 | 2013-12-09 17:03:02 +0000 | [diff] [blame] | 87 | */ |
| 88 | class GLDomain { |
| 89 | public: |
| 90 | GLDomain() { |
joshualitt | b5fb5af | 2015-08-25 12:10:54 -0700 | [diff] [blame] | 91 | for (int i = 0; i < kPrevDomainCount; i++) { |
| 92 | fPrevDomain[i] = SK_FloatNaN; |
| 93 | } |
commit-bot@chromium.org | 907fbd5 | 2013-12-09 17:03:02 +0000 | [diff] [blame] | 94 | SkDEBUGCODE(fMode = (Mode) -1;) |
| 95 | } |
| 96 | |
| 97 | /** |
egdaniel | 64c4728 | 2015-11-13 06:54:19 -0800 | [diff] [blame] | 98 | * Call this from GrGLSLFragmentProcessor::emitCode() to sample the texture W.R.T. the |
| 99 | * domain and mode. |
commit-bot@chromium.org | 907fbd5 | 2013-12-09 17:03:02 +0000 | [diff] [blame] | 100 | * |
Ethan Nicholas | 5af9ea3 | 2017-07-28 15:19:46 -0400 | [diff] [blame] | 101 | * @param outcolor name of float4 variable to hold the sampled color. |
| 102 | * @param inCoords name of float2 variable containing the coords to be used with the domain. |
commit-bot@chromium.org | 907fbd5 | 2013-12-09 17:03:02 +0000 | [diff] [blame] | 103 | * It is assumed that this is a variable and not an expression. |
halcanary | 96fcdcc | 2015-08-27 07:41:13 -0700 | [diff] [blame] | 104 | * @param inModulateColor if non-nullptr the sampled color will be modulated with this |
commit-bot@chromium.org | 907fbd5 | 2013-12-09 17:03:02 +0000 | [diff] [blame] | 105 | * expression before being written to outColor. |
| 106 | */ |
egdaniel | 2d721d3 | 2015-11-11 13:06:05 -0800 | [diff] [blame] | 107 | void sampleTexture(GrGLSLShaderBuilder* builder, |
egdaniel | 7ea439b | 2015-12-03 09:20:44 -0800 | [diff] [blame] | 108 | GrGLSLUniformHandler* uniformHandler, |
Brian Salomon | 1edc5b9 | 2016-11-29 13:43:46 -0500 | [diff] [blame] | 109 | const GrShaderCaps* shaderCaps, |
commit-bot@chromium.org | 907fbd5 | 2013-12-09 17:03:02 +0000 | [diff] [blame] | 110 | const GrTextureDomain& textureDomain, |
| 111 | const char* outColor, |
| 112 | const SkString& inCoords, |
egdaniel | 09aa1fc | 2016-04-20 07:09:46 -0700 | [diff] [blame] | 113 | GrGLSLFragmentProcessor::SamplerHandle sampler, |
Brian Osman | c468963 | 2016-12-19 17:04:59 -0500 | [diff] [blame] | 114 | const char* inModulateColor = nullptr, |
| 115 | GrGLSLColorSpaceXformHelper* colorXformHelper = nullptr); |
commit-bot@chromium.org | 907fbd5 | 2013-12-09 17:03:02 +0000 | [diff] [blame] | 116 | |
| 117 | /** |
egdaniel | 64c4728 | 2015-11-13 06:54:19 -0800 | [diff] [blame] | 118 | * Call this from GrGLSLFragmentProcessor::setData() to upload uniforms necessary for the |
egdaniel | 7dc4bd0 | 2015-10-29 07:57:01 -0700 | [diff] [blame] | 119 | * texture domain. The rectangle is automatically adjusted to account for the texture's |
| 120 | * origin. |
commit-bot@chromium.org | 907fbd5 | 2013-12-09 17:03:02 +0000 | [diff] [blame] | 121 | */ |
Robert Phillips | c686ce3 | 2017-07-21 14:12:29 -0400 | [diff] [blame] | 122 | void setData(const GrGLSLProgramDataManager&, const GrTextureDomain&, GrSurfaceProxy*); |
commit-bot@chromium.org | 907fbd5 | 2013-12-09 17:03:02 +0000 | [diff] [blame] | 123 | |
| 124 | enum { |
| 125 | kDomainKeyBits = 2, // See DomainKey(). |
| 126 | }; |
| 127 | |
| 128 | /** |
egdaniel | 64c4728 | 2015-11-13 06:54:19 -0800 | [diff] [blame] | 129 | * GrGLSLFragmentProcessor::GenKey() must call this and include the returned value in it's |
egdaniel | 7dc4bd0 | 2015-10-29 07:57:01 -0700 | [diff] [blame] | 130 | * computed key. The returned will be limited to the lower kDomainKeyBits bits. |
commit-bot@chromium.org | 907fbd5 | 2013-12-09 17:03:02 +0000 | [diff] [blame] | 131 | */ |
bsalomon | 63e99f7 | 2014-07-21 08:03:14 -0700 | [diff] [blame] | 132 | static uint32_t DomainKey(const GrTextureDomain& domain) { |
Brian Salomon | 2ebd0c8 | 2016-10-03 17:15:28 -0400 | [diff] [blame] | 133 | GR_STATIC_ASSERT(kModeCount <= (1 << kDomainKeyBits)); |
commit-bot@chromium.org | 907fbd5 | 2013-12-09 17:03:02 +0000 | [diff] [blame] | 134 | return domain.mode(); |
| 135 | } |
| 136 | |
| 137 | private: |
joshualitt | b5fb5af | 2015-08-25 12:10:54 -0700 | [diff] [blame] | 138 | static const int kPrevDomainCount = 4; |
egdaniel | 018fb62 | 2015-10-28 07:26:40 -0700 | [diff] [blame] | 139 | SkDEBUGCODE(Mode fMode;) |
| 140 | GrGLSLProgramDataManager::UniformHandle fDomainUni; |
| 141 | SkString fDomainName; |
| 142 | float fPrevDomain[kPrevDomainCount]; |
commit-bot@chromium.org | 907fbd5 | 2013-12-09 17:03:02 +0000 | [diff] [blame] | 143 | }; |
| 144 | |
| 145 | protected: |
| 146 | Mode fMode; |
| 147 | SkRect fDomain; |
| 148 | int fIndex; |
commit-bot@chromium.org | 907fbd5 | 2013-12-09 17:03:02 +0000 | [diff] [blame] | 149 | }; |
| 150 | |
commit-bot@chromium.org | 907fbd5 | 2013-12-09 17:03:02 +0000 | [diff] [blame] | 151 | /** |
| 152 | * A basic texture effect that uses GrTextureDomain. |
| 153 | */ |
Brian Salomon | 6cd51b5 | 2017-07-26 19:07:15 -0400 | [diff] [blame] | 154 | class GrTextureDomainEffect : public GrFragmentProcessor { |
commit-bot@chromium.org | 907fbd5 | 2013-12-09 17:03:02 +0000 | [diff] [blame] | 155 | public: |
Brian Salomon | aff329b | 2017-08-11 09:40:37 -0400 | [diff] [blame^] | 156 | static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy>, |
| 157 | sk_sp<GrColorSpaceXform>, |
| 158 | const SkMatrix&, |
| 159 | const SkRect& domain, |
| 160 | GrTextureDomain::Mode, |
| 161 | GrSamplerParams::FilterMode filterMode); |
Robert Phillips | 40fd7c9 | 2017-01-30 08:06:27 -0500 | [diff] [blame] | 162 | |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 163 | const char* name() const override { return "TextureDomain"; } |
commit-bot@chromium.org | 907fbd5 | 2013-12-09 17:03:02 +0000 | [diff] [blame] | 164 | |
Brian Salomon | aff329b | 2017-08-11 09:40:37 -0400 | [diff] [blame^] | 165 | std::unique_ptr<GrFragmentProcessor> clone() const override { |
| 166 | return std::unique_ptr<GrFragmentProcessor>(new GrTextureDomainEffect(*this)); |
Brian Salomon | 3f6f965 | 2017-07-28 07:34:05 -0400 | [diff] [blame] | 167 | } |
| 168 | |
robertphillips | e004bfc | 2015-11-16 09:06:59 -0800 | [diff] [blame] | 169 | SkString dumpInfo() const override { |
| 170 | SkString str; |
Brian Salomon | 2ebd0c8 | 2016-10-03 17:15:28 -0400 | [diff] [blame] | 171 | str.appendf("Domain: [L: %.2f, T: %.2f, R: %.2f, B: %.2f]", |
robertphillips | e004bfc | 2015-11-16 09:06:59 -0800 | [diff] [blame] | 172 | fTextureDomain.domain().fLeft, fTextureDomain.domain().fTop, |
| 173 | fTextureDomain.domain().fRight, fTextureDomain.domain().fBottom); |
| 174 | str.append(INHERITED::dumpInfo()); |
| 175 | return str; |
| 176 | } |
| 177 | |
Brian Salomon | 2ebd0c8 | 2016-10-03 17:15:28 -0400 | [diff] [blame] | 178 | private: |
Brian Salomon | 6cd51b5 | 2017-07-26 19:07:15 -0400 | [diff] [blame] | 179 | GrCoordTransform fCoordTransform; |
commit-bot@chromium.org | 907fbd5 | 2013-12-09 17:03:02 +0000 | [diff] [blame] | 180 | GrTextureDomain fTextureDomain; |
Brian Salomon | 6cd51b5 | 2017-07-26 19:07:15 -0400 | [diff] [blame] | 181 | TextureSampler fTextureSampler; |
| 182 | sk_sp<GrColorSpaceXform> fColorSpaceXform; |
commit-bot@chromium.org | 907fbd5 | 2013-12-09 17:03:02 +0000 | [diff] [blame] | 183 | |
Robert Phillips | fbcef6e | 2017-06-15 12:07:18 -0400 | [diff] [blame] | 184 | GrTextureDomainEffect(sk_sp<GrTextureProxy>, |
Robert Phillips | 40fd7c9 | 2017-01-30 08:06:27 -0500 | [diff] [blame] | 185 | sk_sp<GrColorSpaceXform>, |
| 186 | const SkMatrix&, |
| 187 | const SkRect& domain, |
| 188 | GrTextureDomain::Mode, |
| 189 | GrSamplerParams::FilterMode); |
| 190 | |
Brian Salomon | 3f6f965 | 2017-07-28 07:34:05 -0400 | [diff] [blame] | 191 | explicit GrTextureDomainEffect(const GrTextureDomainEffect&); |
| 192 | |
Robert Phillips | 40fd7c9 | 2017-01-30 08:06:27 -0500 | [diff] [blame] | 193 | static OptimizationFlags OptFlags(GrPixelConfig config, GrTextureDomain::Mode mode); |
Brian Salomon | 587e08f | 2017-01-27 10:59:27 -0500 | [diff] [blame] | 194 | |
egdaniel | 57d3b03 | 2015-11-13 11:57:27 -0800 | [diff] [blame] | 195 | GrGLSLFragmentProcessor* onCreateGLSLInstance() const override; |
wangyix | b1daa86 | 2015-08-18 11:29:31 -0700 | [diff] [blame] | 196 | |
Brian Salomon | 94efbf5 | 2016-11-29 13:43:05 -0500 | [diff] [blame] | 197 | void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override; |
wangyix | 4b3050b | 2015-08-04 07:59:37 -0700 | [diff] [blame] | 198 | |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 199 | bool onIsEqual(const GrFragmentProcessor&) const override; |
commit-bot@chromium.org | 907fbd5 | 2013-12-09 17:03:02 +0000 | [diff] [blame] | 200 | |
Brian Salomon | 6cd51b5 | 2017-07-26 19:07:15 -0400 | [diff] [blame] | 201 | const GrColorSpaceXform* colorSpaceXform() const { return fColorSpaceXform.get(); } |
| 202 | |
Brian Salomon | 0c26a9d | 2017-07-06 10:09:38 -0400 | [diff] [blame] | 203 | GR_DECLARE_FRAGMENT_PROCESSOR_TEST |
commit-bot@chromium.org | 907fbd5 | 2013-12-09 17:03:02 +0000 | [diff] [blame] | 204 | |
Brian Salomon | 6cd51b5 | 2017-07-26 19:07:15 -0400 | [diff] [blame] | 205 | typedef GrFragmentProcessor INHERITED; |
commit-bot@chromium.org | 907fbd5 | 2013-12-09 17:03:02 +0000 | [diff] [blame] | 206 | }; |
| 207 | |
Brian Salomon | 2ebd0c8 | 2016-10-03 17:15:28 -0400 | [diff] [blame] | 208 | class GrDeviceSpaceTextureDecalFragmentProcessor : public GrFragmentProcessor { |
| 209 | public: |
Brian Salomon | aff329b | 2017-08-11 09:40:37 -0400 | [diff] [blame^] | 210 | static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy>, |
| 211 | const SkIRect& subset, |
| 212 | const SkIPoint& deviceSpaceOffset); |
Robert Phillips | 40fd7c9 | 2017-01-30 08:06:27 -0500 | [diff] [blame] | 213 | |
Brian Salomon | 2ebd0c8 | 2016-10-03 17:15:28 -0400 | [diff] [blame] | 214 | const char* name() const override { return "GrDeviceSpaceTextureDecalFragmentProcessor"; } |
| 215 | |
| 216 | SkString dumpInfo() const override { |
| 217 | SkString str; |
| 218 | str.appendf("Domain: [L: %.2f, T: %.2f, R: %.2f, B: %.2f] Offset: [%d %d]", |
| 219 | fTextureDomain.domain().fLeft, fTextureDomain.domain().fTop, |
| 220 | fTextureDomain.domain().fRight, fTextureDomain.domain().fBottom, |
| 221 | fDeviceSpaceOffset.fX, fDeviceSpaceOffset.fY); |
| 222 | str.append(INHERITED::dumpInfo()); |
| 223 | return str; |
| 224 | } |
| 225 | |
Brian Salomon | aff329b | 2017-08-11 09:40:37 -0400 | [diff] [blame^] | 226 | std::unique_ptr<GrFragmentProcessor> clone() const override; |
Brian Salomon | 1a2a7ab | 2017-07-26 13:11:51 -0400 | [diff] [blame] | 227 | |
Brian Salomon | 2ebd0c8 | 2016-10-03 17:15:28 -0400 | [diff] [blame] | 228 | private: |
Brian Salomon | 0bbecb2 | 2016-11-17 11:38:22 -0500 | [diff] [blame] | 229 | TextureSampler fTextureSampler; |
Brian Salomon | 2ebd0c8 | 2016-10-03 17:15:28 -0400 | [diff] [blame] | 230 | GrTextureDomain fTextureDomain; |
| 231 | SkIPoint fDeviceSpaceOffset; |
| 232 | |
Robert Phillips | fbcef6e | 2017-06-15 12:07:18 -0400 | [diff] [blame] | 233 | GrDeviceSpaceTextureDecalFragmentProcessor(sk_sp<GrTextureProxy>, |
Robert Phillips | 40fd7c9 | 2017-01-30 08:06:27 -0500 | [diff] [blame] | 234 | const SkIRect&, const SkIPoint&); |
Brian Salomon | 1a2a7ab | 2017-07-26 13:11:51 -0400 | [diff] [blame] | 235 | GrDeviceSpaceTextureDecalFragmentProcessor(const GrDeviceSpaceTextureDecalFragmentProcessor&); |
Robert Phillips | 40fd7c9 | 2017-01-30 08:06:27 -0500 | [diff] [blame] | 236 | |
Brian Salomon | 2ebd0c8 | 2016-10-03 17:15:28 -0400 | [diff] [blame] | 237 | GrGLSLFragmentProcessor* onCreateGLSLInstance() const override; |
| 238 | |
| 239 | // Since we always use decal mode, there is no need for key data. |
Brian Salomon | 94efbf5 | 2016-11-29 13:43:05 -0500 | [diff] [blame] | 240 | void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {} |
Brian Salomon | 2ebd0c8 | 2016-10-03 17:15:28 -0400 | [diff] [blame] | 241 | |
| 242 | bool onIsEqual(const GrFragmentProcessor& fp) const override; |
Brian Salomon | 2ebd0c8 | 2016-10-03 17:15:28 -0400 | [diff] [blame] | 243 | |
Brian Salomon | 0c26a9d | 2017-07-06 10:09:38 -0400 | [diff] [blame] | 244 | GR_DECLARE_FRAGMENT_PROCESSOR_TEST |
Brian Salomon | 2ebd0c8 | 2016-10-03 17:15:28 -0400 | [diff] [blame] | 245 | |
| 246 | typedef GrFragmentProcessor INHERITED; |
| 247 | }; |
commit-bot@chromium.org | 907fbd5 | 2013-12-09 17:03:02 +0000 | [diff] [blame] | 248 | #endif |