Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Side by Side Diff: src/gpu/effects/GrTextureDomain.cpp

Issue 1443743002: Rename some processor functions from GL to GLSL (Closed) Base URL: https://skia.googlesource.com/skia.git@primProcs
Patch Set: nits Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/effects/GrTextureDomain.h ('k') | src/gpu/effects/GrXfermodeFragmentProcessor.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 GrCoordSet coordSet) 240 GrCoordSet coordSet)
241 : GrSingleTextureEffect(texture, matrix, filterMode, coordSet) 241 : GrSingleTextureEffect(texture, matrix, filterMode, coordSet)
242 , fTextureDomain(domain, mode) { 242 , fTextureDomain(domain, mode) {
243 SkASSERT(mode != GrTextureDomain::kRepeat_Mode || 243 SkASSERT(mode != GrTextureDomain::kRepeat_Mode ||
244 filterMode == GrTextureParams::kNone_FilterMode); 244 filterMode == GrTextureParams::kNone_FilterMode);
245 this->initClassID<GrTextureDomainEffect>(); 245 this->initClassID<GrTextureDomainEffect>();
246 } 246 }
247 247
248 GrTextureDomainEffect::~GrTextureDomainEffect() {} 248 GrTextureDomainEffect::~GrTextureDomainEffect() {}
249 249
250 void GrTextureDomainEffect::onGetGLProcessorKey(const GrGLSLCaps& caps, 250 void GrTextureDomainEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps,
251 GrProcessorKeyBuilder* b) const { 251 GrProcessorKeyBuilder* b) cons t {
252 GrGLTextureDomainEffect::GenKey(*this, caps, b); 252 GrGLTextureDomainEffect::GenKey(*this, caps, b);
253 } 253 }
254 254
255 GrGLSLFragmentProcessor* GrTextureDomainEffect::onCreateGLInstance() const { 255 GrGLSLFragmentProcessor* GrTextureDomainEffect::onCreateGLSLInstance() const {
256 return new GrGLTextureDomainEffect(*this); 256 return new GrGLTextureDomainEffect(*this);
257 } 257 }
258 258
259 bool GrTextureDomainEffect::onIsEqual(const GrFragmentProcessor& sBase) const { 259 bool GrTextureDomainEffect::onIsEqual(const GrFragmentProcessor& sBase) const {
260 const GrTextureDomainEffect& s = sBase.cast<GrTextureDomainEffect>(); 260 const GrTextureDomainEffect& s = sBase.cast<GrTextureDomainEffect>();
261 return this->fTextureDomain == s.fTextureDomain; 261 return this->fTextureDomain == s.fTextureDomain;
262 } 262 }
263 263
264 void GrTextureDomainEffect::onComputeInvariantOutput(GrInvariantOutput* inout) c onst { 264 void GrTextureDomainEffect::onComputeInvariantOutput(GrInvariantOutput* inout) c onst {
265 if (GrTextureDomain::kDecal_Mode == fTextureDomain.mode()) { // TODO: helper 265 if (GrTextureDomain::kDecal_Mode == fTextureDomain.mode()) { // TODO: helper
(...skipping 25 matching lines...) Expand all
291 bool bilerp = mode != GrTextureDomain::kRepeat_Mode ? d->fRandom->nextBool() : false; 291 bool bilerp = mode != GrTextureDomain::kRepeat_Mode ? d->fRandom->nextBool() : false;
292 GrCoordSet coords = d->fRandom->nextBool() ? kLocal_GrCoordSet : kDevice_GrC oordSet; 292 GrCoordSet coords = d->fRandom->nextBool() ? kLocal_GrCoordSet : kDevice_GrC oordSet;
293 return GrTextureDomainEffect::Create( 293 return GrTextureDomainEffect::Create(
294 d->fTextures[texIdx], 294 d->fTextures[texIdx],
295 matrix, 295 matrix,
296 domain, 296 domain,
297 mode, 297 mode,
298 bilerp ? GrTextureParams::kBilerp_FilterMode : GrTextureParams::kNone_Fi lterMode, 298 bilerp ? GrTextureParams::kBilerp_FilterMode : GrTextureParams::kNone_Fi lterMode,
299 coords); 299 coords);
300 } 300 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrTextureDomain.h ('k') | src/gpu/effects/GrXfermodeFragmentProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698