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

Side by Side Diff: src/effects/SkMagnifierImageFilter.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/SkLightingImageFilter.cpp ('k') | src/effects/SkMatrixConvolutionImageFilter.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 The Android Open Source Project 2 * Copyright 2012 The Android Open Source Project
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 "SkBitmap.h" 8 #include "SkBitmap.h"
9 #include "SkMagnifierImageFilter.h" 9 #include "SkMagnifierImageFilter.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 return GrGLEffectMatrix::GenKey(zoom.getMatrix(), 189 return GrGLEffectMatrix::GenKey(zoom.getMatrix(),
190 drawEffect, 190 drawEffect,
191 zoom.coordsType(), 191 zoom.coordsType(),
192 zoom.texture(0)); 192 zoom.texture(0));
193 } 193 }
194 194
195 ///////////////////////////////////////////////////////////////////// 195 /////////////////////////////////////////////////////////////////////
196 196
197 GR_DEFINE_EFFECT_TEST(GrMagnifierEffect); 197 GR_DEFINE_EFFECT_TEST(GrMagnifierEffect);
198 198
199 GrEffectRef* GrMagnifierEffect::TestCreate(SkMWCRandom* random, 199 GrEffectRef* GrMagnifierEffect::TestCreate(SkRandom* random,
200 GrContext* context, 200 GrContext* context,
201 const GrDrawTargetCaps&, 201 const GrDrawTargetCaps&,
202 GrTexture** textures) { 202 GrTexture** textures) {
203 const int kMaxWidth = 200; 203 const int kMaxWidth = 200;
204 const int kMaxHeight = 200; 204 const int kMaxHeight = 200;
205 const int kMaxInset = 20; 205 const int kMaxInset = 20;
206 uint32_t width = random->nextULessThan(kMaxWidth); 206 uint32_t width = random->nextULessThan(kMaxWidth);
207 uint32_t height = random->nextULessThan(kMaxHeight); 207 uint32_t height = random->nextULessThan(kMaxHeight);
208 uint32_t x = random->nextULessThan(kMaxWidth - width); 208 uint32_t x = random->nextULessThan(kMaxWidth - width);
209 uint32_t y = random->nextULessThan(kMaxHeight - height); 209 uint32_t y = random->nextULessThan(kMaxHeight - height);
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 342
343 int x_val = SkMin32(SkScalarFloorToInt(x_interp), width - 1); 343 int x_val = SkMin32(SkScalarFloorToInt(x_interp), width - 1);
344 int y_val = SkMin32(SkScalarFloorToInt(y_interp), height - 1); 344 int y_val = SkMin32(SkScalarFloorToInt(y_interp), height - 1);
345 345
346 *dptr = sptr[y_val * width + x_val]; 346 *dptr = sptr[y_val * width + x_val];
347 dptr++; 347 dptr++;
348 } 348 }
349 } 349 }
350 return true; 350 return true;
351 } 351 }
OLDNEW
« no previous file with comments | « src/effects/SkLightingImageFilter.cpp ('k') | src/effects/SkMatrixConvolutionImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698