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

Side by Side Diff: src/gpu/effects/GrConfigConversionEffect.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/GrBicubicEffect.cpp ('k') | src/gpu/effects/GrConvolutionEffect.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 "GrConfigConversionEffect.h" 8 #include "GrConfigConversionEffect.h"
9 #include "GrContext.h" 9 #include "GrContext.h"
10 #include "GrTBackendEffectFactory.h" 10 #include "GrTBackendEffectFactory.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 127
128 void GrConfigConversionEffect::getConstantColorComponents(GrColor* color, 128 void GrConfigConversionEffect::getConstantColorComponents(GrColor* color,
129 uint32_t* validFlags) const { 129 uint32_t* validFlags) const {
130 this->updateConstantColorComponentsForModulation(color, validFlags); 130 this->updateConstantColorComponentsForModulation(color, validFlags);
131 } 131 }
132 132
133 /////////////////////////////////////////////////////////////////////////////// 133 ///////////////////////////////////////////////////////////////////////////////
134 134
135 GR_DEFINE_EFFECT_TEST(GrConfigConversionEffect); 135 GR_DEFINE_EFFECT_TEST(GrConfigConversionEffect);
136 136
137 GrEffectRef* GrConfigConversionEffect::TestCreate(SkMWCRandom* random, 137 GrEffectRef* GrConfigConversionEffect::TestCreate(SkRandom* random,
138 GrContext*, 138 GrContext*,
139 const GrDrawTargetCaps&, 139 const GrDrawTargetCaps&,
140 GrTexture* textures[]) { 140 GrTexture* textures[]) {
141 PMConversion pmConv = static_cast<PMConversion>(random->nextULessThan(kPMCon versionCnt)); 141 PMConversion pmConv = static_cast<PMConversion>(random->nextULessThan(kPMCon versionCnt));
142 bool swapRB; 142 bool swapRB;
143 if (kNone_PMConversion == pmConv) { 143 if (kNone_PMConversion == pmConv) {
144 swapRB = true; 144 swapRB = true;
145 } else { 145 } else {
146 swapRB = random->nextBool(); 146 swapRB = random->nextBool();
147 } 147 }
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 // The PM conversions assume colors are 0..255 284 // The PM conversions assume colors are 0..255
285 return NULL; 285 return NULL;
286 } 286 }
287 AutoEffectUnref effect(SkNEW_ARGS(GrConfigConversionEffect, (texture, 287 AutoEffectUnref effect(SkNEW_ARGS(GrConfigConversionEffect, (texture,
288 swapRedAndB lue, 288 swapRedAndB lue,
289 pmConversio n, 289 pmConversio n,
290 matrix))); 290 matrix)));
291 return CreateEffectRef(effect); 291 return CreateEffectRef(effect);
292 } 292 }
293 } 293 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrBicubicEffect.cpp ('k') | src/gpu/effects/GrConvolutionEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698