OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 "GrTextureDomain.h" | 8 #include "GrTextureDomain.h" |
9 #include "GrInvariantOutput.h" | 9 #include "GrInvariantOutput.h" |
10 #include "GrSimpleTextureEffect.h" | 10 #include "GrSimpleTextureEffect.h" |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 , fTextureDomain(domain, mode) { | 248 , fTextureDomain(domain, mode) { |
249 SkASSERT(mode != GrTextureDomain::kRepeat_Mode || | 249 SkASSERT(mode != GrTextureDomain::kRepeat_Mode || |
250 filterMode == GrTextureParams::kNone_FilterMode); | 250 filterMode == GrTextureParams::kNone_FilterMode); |
251 this->initClassID<GrTextureDomainEffect>(); | 251 this->initClassID<GrTextureDomainEffect>(); |
252 } | 252 } |
253 | 253 |
254 GrTextureDomainEffect::~GrTextureDomainEffect() { | 254 GrTextureDomainEffect::~GrTextureDomainEffect() { |
255 | 255 |
256 } | 256 } |
257 | 257 |
258 void GrTextureDomainEffect::getGLProcessorKey(const GrGLSLCaps& caps, | 258 void GrTextureDomainEffect::onGetGLProcessorKey(const GrGLSLCaps& caps, |
259 GrProcessorKeyBuilder* b) const { | 259 GrProcessorKeyBuilder* b) const { |
260 GrGLTextureDomainEffect::GenKey(*this, caps, b); | 260 GrGLTextureDomainEffect::GenKey(*this, caps, b); |
261 } | 261 } |
262 | 262 |
263 GrGLFragmentProcessor* GrTextureDomainEffect::createGLInstance() const { | 263 GrGLFragmentProcessor* GrTextureDomainEffect::createGLInstance() const { |
264 return SkNEW_ARGS(GrGLTextureDomainEffect, (*this)); | 264 return SkNEW_ARGS(GrGLTextureDomainEffect, (*this)); |
265 } | 265 } |
266 | 266 |
267 bool GrTextureDomainEffect::onIsEqual(const GrFragmentProcessor& sBase) const { | 267 bool GrTextureDomainEffect::onIsEqual(const GrFragmentProcessor& sBase) const { |
268 const GrTextureDomainEffect& s = sBase.cast<GrTextureDomainEffect>(); | 268 const GrTextureDomainEffect& s = sBase.cast<GrTextureDomainEffect>(); |
(...skipping 30 matching lines...) Expand all Loading... |
299 bool bilerp = mode != GrTextureDomain::kRepeat_Mode ? d->fRandom->nextBool()
: false; | 299 bool bilerp = mode != GrTextureDomain::kRepeat_Mode ? d->fRandom->nextBool()
: false; |
300 GrCoordSet coords = d->fRandom->nextBool() ? kLocal_GrCoordSet : kDevice_GrC
oordSet; | 300 GrCoordSet coords = d->fRandom->nextBool() ? kLocal_GrCoordSet : kDevice_GrC
oordSet; |
301 return GrTextureDomainEffect::Create(d->fProcDataManager, | 301 return GrTextureDomainEffect::Create(d->fProcDataManager, |
302 d->fTextures[texIdx], | 302 d->fTextures[texIdx], |
303 matrix, | 303 matrix, |
304 domain, | 304 domain, |
305 mode, | 305 mode, |
306 bilerp ? GrTextureParams::kBilerp_Filte
rMode : GrTextureParams::kNone_FilterMode, | 306 bilerp ? GrTextureParams::kBilerp_Filte
rMode : GrTextureParams::kNone_FilterMode, |
307 coords); | 307 coords); |
308 } | 308 } |
OLD | NEW |