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

Side by Side Diff: src/effects/gradients/SkGradientShaderPriv.h

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/effects/gradients/SkGradientShader.cpp ('k') | src/effects/gradients/SkLinearGradient.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 #ifndef SkGradientShaderPriv_DEFINED 8 #ifndef SkGradientShaderPriv_DEFINED
9 #define SkGradientShaderPriv_DEFINED 9 #define SkGradientShaderPriv_DEFINED
10 10
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 protected: 254 protected:
255 255
256 /** Populates a pair of arrays with colors and stop info to construct a rand om gradient. 256 /** Populates a pair of arrays with colors and stop info to construct a rand om gradient.
257 The function decides whether stop values should be used or not. The retu rn value indicates 257 The function decides whether stop values should be used or not. The retu rn value indicates
258 the number of colors, which will be capped by kMaxRandomGradientColors. colors should be 258 the number of colors, which will be capped by kMaxRandomGradientColors. colors should be
259 sized to be at least kMaxRandomGradientColors. stops is a pointer to an array of at least 259 sized to be at least kMaxRandomGradientColors. stops is a pointer to an array of at least
260 size kMaxRandomGradientColors. It may be updated to NULL, indicating tha t NULL should be 260 size kMaxRandomGradientColors. It may be updated to NULL, indicating tha t NULL should be
261 passed to the gradient factory rather than the array. 261 passed to the gradient factory rather than the array.
262 */ 262 */
263 static const int kMaxRandomGradientColors = 4; 263 static const int kMaxRandomGradientColors = 4;
264 static int RandomGradientParams(SkMWCRandom* r, 264 static int RandomGradientParams(SkRandom* r,
265 SkColor colors[kMaxRandomGradientColors], 265 SkColor colors[kMaxRandomGradientColors],
266 SkScalar** stops, 266 SkScalar** stops,
267 SkShader::TileMode* tm); 267 SkShader::TileMode* tm);
268 268
269 virtual bool onIsEqual(const GrEffect& effect) const SK_OVERRIDE; 269 virtual bool onIsEqual(const GrEffect& effect) const SK_OVERRIDE;
270 270
271 private: 271 private:
272 272
273 GrTextureAccess fTextureAccess; 273 GrTextureAccess fTextureAccess;
274 SkScalar fYCoord; 274 SkScalar fYCoord;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 SkScalar fCachedYCoord; 340 SkScalar fCachedYCoord;
341 GrGLUniformManager::UniformHandle fFSYUni; 341 GrGLUniformManager::UniformHandle fFSYUni;
342 GrGLEffectMatrix fEffectMatrix; 342 GrGLEffectMatrix fEffectMatrix;
343 343
344 typedef GrGLEffect INHERITED; 344 typedef GrGLEffect INHERITED;
345 }; 345 };
346 346
347 #endif 347 #endif
348 348
349 #endif 349 #endif
OLDNEW
« no previous file with comments | « src/effects/gradients/SkGradientShader.cpp ('k') | src/effects/gradients/SkLinearGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698