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

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

Issue 22340010: Refactor GrGLUniformManager::UniformHandle to initialize itself by default (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: description Created 7 years, 4 months 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/effects/GrConvolutionEffect.cpp ('k') | src/gpu/gl/GrGLEffectMatrix.h » ('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 "GrTextureDomainEffect.h" 8 #include "GrTextureDomainEffect.h"
9 #include "GrSimpleTextureEffect.h" 9 #include "GrSimpleTextureEffect.h"
10 #include "GrTBackendEffectFactory.h" 10 #include "GrTBackendEffectFactory.h"
(...skipping 20 matching lines...) Expand all
31 GrGLUniformManager::UniformHandle fNameUni; 31 GrGLUniformManager::UniformHandle fNameUni;
32 GrGLEffectMatrix fEffectMatrix; 32 GrGLEffectMatrix fEffectMatrix;
33 GrGLfloat fPrevDomain[4]; 33 GrGLfloat fPrevDomain[4];
34 34
35 typedef GrGLEffect INHERITED; 35 typedef GrGLEffect INHERITED;
36 }; 36 };
37 37
38 GrGLTextureDomainEffect::GrGLTextureDomainEffect(const GrBackendEffectFactory& f actory, 38 GrGLTextureDomainEffect::GrGLTextureDomainEffect(const GrBackendEffectFactory& f actory,
39 const GrDrawEffect& drawEffect) 39 const GrDrawEffect& drawEffect)
40 : INHERITED(factory) 40 : INHERITED(factory)
41 , fNameUni(GrGLUniformManager::kInvalidUniformHandle)
42 , fEffectMatrix(drawEffect.castEffect<GrTextureDomainEffect>().coordsType()) { 41 , fEffectMatrix(drawEffect.castEffect<GrTextureDomainEffect>().coordsType()) {
43 fPrevDomain[0] = SK_FloatNaN; 42 fPrevDomain[0] = SK_FloatNaN;
44 } 43 }
45 44
46 void GrGLTextureDomainEffect::emitCode(GrGLShaderBuilder* builder, 45 void GrGLTextureDomainEffect::emitCode(GrGLShaderBuilder* builder,
47 const GrDrawEffect& drawEffect, 46 const GrDrawEffect& drawEffect,
48 EffectKey key, 47 EffectKey key,
49 const char* outputColor, 48 const char* outputColor,
50 const char* inputColor, 49 const char* inputColor,
51 const TextureSamplerArray& samplers) { 50 const TextureSamplerArray& samplers) {
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 const SkMatrix& matrix = GrEffectUnitTest::TestMatrix(random); 234 const SkMatrix& matrix = GrEffectUnitTest::TestMatrix(random);
236 bool bilerp = random->nextBool(); 235 bool bilerp = random->nextBool();
237 CoordsType coords = random->nextBool() ? kLocal_CoordsType : kPosition_Coord sType; 236 CoordsType coords = random->nextBool() ? kLocal_CoordsType : kPosition_Coord sType;
238 return GrTextureDomainEffect::Create(textures[texIdx], 237 return GrTextureDomainEffect::Create(textures[texIdx],
239 matrix, 238 matrix,
240 domain, 239 domain,
241 wrapMode, 240 wrapMode,
242 bilerp ? GrTextureParams::kBilerp_Filte rMode : GrTextureParams::kNone_FilterMode, 241 bilerp ? GrTextureParams::kBilerp_Filte rMode : GrTextureParams::kNone_FilterMode,
243 coords); 242 coords);
244 } 243 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrConvolutionEffect.cpp ('k') | src/gpu/gl/GrGLEffectMatrix.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698