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

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

Issue 12965018: Move nested class GrDrawTarget::Caps out as GrDrawTargetCaps. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 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
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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 this->updateConstantColorComponentsForModulation(color, validFlags); 214 this->updateConstantColorComponentsForModulation(color, validFlags);
215 } 215 }
216 } 216 }
217 217
218 /////////////////////////////////////////////////////////////////////////////// 218 ///////////////////////////////////////////////////////////////////////////////
219 219
220 GR_DEFINE_EFFECT_TEST(GrTextureDomainEffect); 220 GR_DEFINE_EFFECT_TEST(GrTextureDomainEffect);
221 221
222 GrEffectRef* GrTextureDomainEffect::TestCreate(SkMWCRandom* random, 222 GrEffectRef* GrTextureDomainEffect::TestCreate(SkMWCRandom* random,
223 GrContext*, 223 GrContext*,
224 const GrDrawTargetCaps&,
224 GrTexture* textures[]) { 225 GrTexture* textures[]) {
225 int texIdx = random->nextBool() ? GrEffectUnitTest::kSkiaPMTextureIdx : 226 int texIdx = random->nextBool() ? GrEffectUnitTest::kSkiaPMTextureIdx :
226 GrEffectUnitTest::kAlphaTextureIdx; 227 GrEffectUnitTest::kAlphaTextureIdx;
227 GrRect domain; 228 GrRect domain;
228 domain.fLeft = random->nextUScalar1(); 229 domain.fLeft = random->nextUScalar1();
229 domain.fRight = random->nextRangeScalar(domain.fLeft, SK_Scalar1); 230 domain.fRight = random->nextRangeScalar(domain.fLeft, SK_Scalar1);
230 domain.fTop = random->nextUScalar1(); 231 domain.fTop = random->nextUScalar1();
231 domain.fBottom = random->nextRangeScalar(domain.fTop, SK_Scalar1); 232 domain.fBottom = random->nextRangeScalar(domain.fTop, SK_Scalar1);
232 WrapMode wrapMode = random->nextBool() ? kClamp_WrapMode : kDecal_WrapMode; 233 WrapMode wrapMode = random->nextBool() ? kClamp_WrapMode : kDecal_WrapMode;
233 const SkMatrix& matrix = GrEffectUnitTest::TestMatrix(random); 234 const SkMatrix& matrix = GrEffectUnitTest::TestMatrix(random);
234 bool bilerp = random->nextBool(); 235 bool bilerp = random->nextBool();
235 CoordsType coords = random->nextBool() ? kLocal_CoordsType : kPosition_Coord sType; 236 CoordsType coords = random->nextBool() ? kLocal_CoordsType : kPosition_Coord sType;
236 return GrTextureDomainEffect::Create(textures[texIdx], 237 return GrTextureDomainEffect::Create(textures[texIdx],
237 matrix, 238 matrix,
238 domain, 239 domain,
239 wrapMode, 240 wrapMode,
240 bilerp, 241 bilerp,
241 coords); 242 coords);
242 } 243 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698