OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "GrBicubicEffect.h" | 8 #include "GrBicubicEffect.h" |
9 | 9 |
10 #include "gl/GrGLShaderBuilder.h" | 10 #include "gl/GrGLShaderBuilder.h" |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 GrBicubicEffect::~GrBicubicEffect() { | 157 GrBicubicEffect::~GrBicubicEffect() { |
158 } | 158 } |
159 | 159 |
160 const GrBackendEffectFactory& GrBicubicEffect::getFactory() const { | 160 const GrBackendEffectFactory& GrBicubicEffect::getFactory() const { |
161 return GrTBackendEffectFactory<GrBicubicEffect>::getInstance(); | 161 return GrTBackendEffectFactory<GrBicubicEffect>::getInstance(); |
162 } | 162 } |
163 | 163 |
164 bool GrBicubicEffect::onIsEqual(const GrEffect& sBase) const { | 164 bool GrBicubicEffect::onIsEqual(const GrEffect& sBase) const { |
165 const GrBicubicEffect& s = CastEffect<GrBicubicEffect>(sBase); | 165 const GrBicubicEffect& s = CastEffect<GrBicubicEffect>(sBase); |
166 return this->textureAccess(0) == s.textureAccess(0) && | 166 return this->textureAccess(0) == s.textureAccess(0) && |
167 !memcmp(fCoefficients, s.coefficients(), 16); | 167 !memcmp(fCoefficients, s.coefficients(), 16) && |
| 168 fDomain == s.fDomain; |
168 } | 169 } |
169 | 170 |
170 void GrBicubicEffect::getConstantColorComponents(GrColor* color, uint32_t* valid
Flags) const { | 171 void GrBicubicEffect::getConstantColorComponents(GrColor* color, uint32_t* valid
Flags) const { |
171 // FIXME: Perhaps we can do better. | 172 // FIXME: Perhaps we can do better. |
172 *validFlags = 0; | 173 *validFlags = 0; |
173 return; | 174 return; |
174 } | 175 } |
175 | 176 |
176 GR_DEFINE_EFFECT_TEST(GrBicubicEffect); | 177 GR_DEFINE_EFFECT_TEST(GrBicubicEffect); |
177 | 178 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 // Use bilerp to handle rotation or fractional translation. | 214 // Use bilerp to handle rotation or fractional translation. |
214 *filterMode = GrTextureParams::kBilerp_FilterMode; | 215 *filterMode = GrTextureParams::kBilerp_FilterMode; |
215 } | 216 } |
216 return false; | 217 return false; |
217 } | 218 } |
218 // When we use the bicubic filtering effect each sample is read from the tex
ture using | 219 // When we use the bicubic filtering effect each sample is read from the tex
ture using |
219 // nearest neighbor sampling. | 220 // nearest neighbor sampling. |
220 *filterMode = GrTextureParams::kNone_FilterMode; | 221 *filterMode = GrTextureParams::kNone_FilterMode; |
221 return true; | 222 return true; |
222 } | 223 } |
OLD | NEW |