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

Side by Side Diff: src/effects/SkColorMatrixFilter.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/effects/SkBitmapAlphaThresholdShader.cpp ('k') | src/effects/SkDiscretePathEffect.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "SkColorMatrixFilter.h" 8 #include "SkColorMatrixFilter.h"
9 #include "SkColorMatrix.h" 9 #include "SkColorMatrix.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 return cme.fMatrix == fMatrix; 454 return cme.fMatrix == fMatrix;
455 } 455 }
456 456
457 SkColorMatrix fMatrix; 457 SkColorMatrix fMatrix;
458 458
459 typedef GrGLEffect INHERITED; 459 typedef GrGLEffect INHERITED;
460 }; 460 };
461 461
462 GR_DEFINE_EFFECT_TEST(ColorMatrixEffect); 462 GR_DEFINE_EFFECT_TEST(ColorMatrixEffect);
463 463
464 GrEffectRef* ColorMatrixEffect::TestCreate(SkMWCRandom* random, 464 GrEffectRef* ColorMatrixEffect::TestCreate(SkRandom* random,
465 GrContext*, 465 GrContext*,
466 const GrDrawTargetCaps&, 466 const GrDrawTargetCaps&,
467 GrTexture* dummyTextures[2]) { 467 GrTexture* dummyTextures[2]) {
468 SkColorMatrix colorMatrix; 468 SkColorMatrix colorMatrix;
469 for (size_t i = 0; i < SK_ARRAY_COUNT(colorMatrix.fMat); ++i) { 469 for (size_t i = 0; i < SK_ARRAY_COUNT(colorMatrix.fMat); ++i) {
470 colorMatrix.fMat[i] = random->nextSScalar1(); 470 colorMatrix.fMat[i] = random->nextSScalar1();
471 } 471 }
472 return ColorMatrixEffect::Create(colorMatrix); 472 return ColorMatrixEffect::Create(colorMatrix);
473 } 473 }
474 474
(...skipping 10 matching lines...) Expand all
485 str->append("matrix: ("); 485 str->append("matrix: (");
486 for (int i = 0; i < 20; ++i) { 486 for (int i = 0; i < 20; ++i) {
487 str->appendScalar(fMatrix.fMat[i]); 487 str->appendScalar(fMatrix.fMat[i]);
488 if (i < 19) { 488 if (i < 19) {
489 str->append(", "); 489 str->append(", ");
490 } 490 }
491 } 491 }
492 str->append(")"); 492 str->append(")");
493 } 493 }
494 #endif 494 #endif
OLDNEW
« no previous file with comments | « src/effects/SkBitmapAlphaThresholdShader.cpp ('k') | src/effects/SkDiscretePathEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698