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

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

Issue 23576015: Change old PRG to be SkLCGRandom; change new one to SkRandom (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fix some spurious SkMWCRandoms Created 7 years, 3 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/effects/GrTextureDomainEffect.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 "GrSimpleTextureEffect.h" 8 #include "GrSimpleTextureEffect.h"
9 #include "gl/GrGLEffect.h" 9 #include "gl/GrGLEffect.h"
10 #include "gl/GrGLEffectMatrix.h" 10 #include "gl/GrGLEffectMatrix.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 } 96 }
97 97
98 const GrBackendEffectFactory& GrSimpleTextureEffect::getFactory() const { 98 const GrBackendEffectFactory& GrSimpleTextureEffect::getFactory() const {
99 return GrTBackendEffectFactory<GrSimpleTextureEffect>::getInstance(); 99 return GrTBackendEffectFactory<GrSimpleTextureEffect>::getInstance();
100 } 100 }
101 101
102 /////////////////////////////////////////////////////////////////////////////// 102 ///////////////////////////////////////////////////////////////////////////////
103 103
104 GR_DEFINE_EFFECT_TEST(GrSimpleTextureEffect); 104 GR_DEFINE_EFFECT_TEST(GrSimpleTextureEffect);
105 105
106 GrEffectRef* GrSimpleTextureEffect::TestCreate(SkMWCRandom* random, 106 GrEffectRef* GrSimpleTextureEffect::TestCreate(SkRandom* random,
107 GrContext*, 107 GrContext*,
108 const GrDrawTargetCaps&, 108 const GrDrawTargetCaps&,
109 GrTexture* textures[]) { 109 GrTexture* textures[]) {
110 int texIdx = random->nextBool() ? GrEffectUnitTest::kSkiaPMTextureIdx : 110 int texIdx = random->nextBool() ? GrEffectUnitTest::kSkiaPMTextureIdx :
111 GrEffectUnitTest::kAlphaTextureIdx; 111 GrEffectUnitTest::kAlphaTextureIdx;
112 static const SkShader::TileMode kTileModes[] = { 112 static const SkShader::TileMode kTileModes[] = {
113 SkShader::kClamp_TileMode, 113 SkShader::kClamp_TileMode,
114 SkShader::kRepeat_TileMode, 114 SkShader::kRepeat_TileMode,
115 SkShader::kMirror_TileMode, 115 SkShader::kMirror_TileMode,
116 }; 116 };
(...skipping 11 matching lines...) Expand all
128 }; 128 };
129 CoordsType coordsType = kCoordsTypes[random->nextULessThan(GR_ARRAY_COUNT(kC oordsTypes))]; 129 CoordsType coordsType = kCoordsTypes[random->nextULessThan(GR_ARRAY_COUNT(kC oordsTypes))];
130 130
131 if (kCustom_CoordsType == coordsType) { 131 if (kCustom_CoordsType == coordsType) {
132 return GrSimpleTextureEffect::CreateWithCustomCoords(textures[texIdx], p arams); 132 return GrSimpleTextureEffect::CreateWithCustomCoords(textures[texIdx], p arams);
133 } else { 133 } else {
134 const SkMatrix& matrix = GrEffectUnitTest::TestMatrix(random); 134 const SkMatrix& matrix = GrEffectUnitTest::TestMatrix(random);
135 return GrSimpleTextureEffect::Create(textures[texIdx], matrix); 135 return GrSimpleTextureEffect::Create(textures[texIdx], matrix);
136 } 136 }
137 } 137 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrConvolutionEffect.cpp ('k') | src/gpu/effects/GrTextureDomainEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698