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

Side by Side Diff: src/gpu/effects/GrBicubicEffect.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/GrBezierEffect.cpp ('k') | src/gpu/effects/GrConfigConversionEffect.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 #include "GrBicubicEffect.h" 1 #include "GrBicubicEffect.h"
2 2
3 #define DS(x) SkDoubleToScalar(x) 3 #define DS(x) SkDoubleToScalar(x)
4 4
5 const SkScalar GrBicubicEffect::gMitchellCoefficients[16] = { 5 const SkScalar GrBicubicEffect::gMitchellCoefficients[16] = {
6 DS( 1.0 / 18.0), DS(-9.0 / 18.0), DS( 15.0 / 18.0), DS( -7.0 / 18.0), 6 DS( 1.0 / 18.0), DS(-9.0 / 18.0), DS( 15.0 / 18.0), DS( -7.0 / 18.0),
7 DS(16.0 / 18.0), DS( 0.0 / 18.0), DS(-36.0 / 18.0), DS( 21.0 / 18.0), 7 DS(16.0 / 18.0), DS( 0.0 / 18.0), DS(-36.0 / 18.0), DS( 21.0 / 18.0),
8 DS( 1.0 / 18.0), DS( 9.0 / 18.0), DS( 27.0 / 18.0), DS(-21.0 / 18.0), 8 DS( 1.0 / 18.0), DS( 9.0 / 18.0), DS( 27.0 / 18.0), DS(-21.0 / 18.0),
9 DS( 0.0 / 18.0), DS( 0.0 / 18.0), DS( -6.0 / 18.0), DS( 7.0 / 18.0), 9 DS( 0.0 / 18.0), DS( 0.0 / 18.0), DS( -6.0 / 18.0), DS( 7.0 / 18.0),
10 }; 10 };
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 } 154 }
155 155
156 void GrBicubicEffect::getConstantColorComponents(GrColor* color, uint32_t* valid Flags) const { 156 void GrBicubicEffect::getConstantColorComponents(GrColor* color, uint32_t* valid Flags) const {
157 // FIXME: Perhaps we can do better. 157 // FIXME: Perhaps we can do better.
158 *validFlags = 0; 158 *validFlags = 0;
159 return; 159 return;
160 } 160 }
161 161
162 GR_DEFINE_EFFECT_TEST(GrBicubicEffect); 162 GR_DEFINE_EFFECT_TEST(GrBicubicEffect);
163 163
164 GrEffectRef* GrBicubicEffect::TestCreate(SkMWCRandom* random, 164 GrEffectRef* GrBicubicEffect::TestCreate(SkRandom* random,
165 GrContext* context, 165 GrContext* context,
166 const GrDrawTargetCaps&, 166 const GrDrawTargetCaps&,
167 GrTexture* textures[]) { 167 GrTexture* textures[]) {
168 int texIdx = random->nextBool() ? GrEffectUnitTest::kSkiaPMTextureIdx : 168 int texIdx = random->nextBool() ? GrEffectUnitTest::kSkiaPMTextureIdx :
169 GrEffectUnitTest::kAlphaTextureIdx; 169 GrEffectUnitTest::kAlphaTextureIdx;
170 SkScalar coefficients[16]; 170 SkScalar coefficients[16];
171 for (int i = 0; i < 16; i++) { 171 for (int i = 0; i < 16; i++) {
172 coefficients[i] = random->nextSScalar1(); 172 coefficients[i] = random->nextSScalar1();
173 } 173 }
174 return GrBicubicEffect::Create(textures[texIdx], coefficients); 174 return GrBicubicEffect::Create(textures[texIdx], coefficients);
175 } 175 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrBezierEffect.cpp ('k') | src/gpu/effects/GrConfigConversionEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698