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

Side by Side Diff: src/effects/SkArithmeticMode.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/core/SkXfermode.cpp ('k') | src/effects/SkBitmapAlphaThresholdShader.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 2013 Google Inc. 2 * Copyright 2013 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 "SkArithmeticMode.h" 8 #include "SkArithmeticMode.h"
9 #include "SkColorPriv.h" 9 #include "SkColorPriv.h"
10 #include "SkFlattenableBuffers.h" 10 #include "SkFlattenableBuffers.h"
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 EffectKey bgKey = 0; 408 EffectKey bgKey = 0;
409 if (bgTex) { 409 if (bgTex) {
410 bgKey = GrGLEffectMatrix::GenKey(GrEffect::MakeDivByTextureWHMatrix(bgTe x), 410 bgKey = GrGLEffectMatrix::GenKey(GrEffect::MakeDivByTextureWHMatrix(bgTe x),
411 drawEffect, 411 drawEffect,
412 GrGLArithmeticEffect::kCoordsType, 412 GrGLArithmeticEffect::kCoordsType,
413 bgTex); 413 bgTex);
414 } 414 }
415 return bgKey; 415 return bgKey;
416 } 416 }
417 417
418 GrEffectRef* GrArithmeticEffect::TestCreate(SkMWCRandom* rand, 418 GrEffectRef* GrArithmeticEffect::TestCreate(SkRandom* rand,
419 GrContext*, 419 GrContext*,
420 const GrDrawTargetCaps&, 420 const GrDrawTargetCaps&,
421 GrTexture*[]) { 421 GrTexture*[]) {
422 float k1 = rand->nextF(); 422 float k1 = rand->nextF();
423 float k2 = rand->nextF(); 423 float k2 = rand->nextF();
424 float k3 = rand->nextF(); 424 float k3 = rand->nextF();
425 float k4 = rand->nextF(); 425 float k4 = rand->nextF();
426 426
427 static AutoEffectUnref gEffect(SkNEW_ARGS(GrArithmeticEffect, (k1, k2, k3, k 4, NULL))); 427 static AutoEffectUnref gEffect(SkNEW_ARGS(GrArithmeticEffect, (k1, k2, k3, k 4, NULL)));
428 return CreateEffectRef(gEffect); 428 return CreateEffectRef(gEffect);
(...skipping 14 matching lines...) Expand all
443 background); 443 background);
444 } 444 }
445 return true; 445 return true;
446 } 446 }
447 447
448 #endif 448 #endif
449 449
450 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkArithmeticMode) 450 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkArithmeticMode)
451 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkArithmeticMode_scalar) 451 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkArithmeticMode_scalar)
452 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 452 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW
« no previous file with comments | « src/core/SkXfermode.cpp ('k') | src/effects/SkBitmapAlphaThresholdShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698