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

Unified Diff: unit_test/scale_argb_test.cc

Issue 1361813002: replace random with fastrand (Closed) Base URL: https://chromium.googlesource.com/libyuv/libyuv@master
Patch Set: remove win32 version of random Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « unit_test/rotate_test.cc ('k') | unit_test/scale_color_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: unit_test/scale_argb_test.cc
diff --git a/unit_test/scale_argb_test.cc b/unit_test/scale_argb_test.cc
index fee345256c3bececba9f97b26be76fbd91be624a..ecf894189c9688d47e1eeed22fc0b1cc63622394 100644
--- a/unit_test/scale_argb_test.cc
+++ b/unit_test/scale_argb_test.cc
@@ -37,7 +37,6 @@ static int ARGBTestFilter(int src_width, int src_height,
printf("Skipped. Alloc failed " FILELINESTR(__FILE__, __LINE__) "\n");
return 0;
}
- srandom(time(NULL));
MemRandomize(src_argb, src_argb_plane_size);
int64 dst_argb_plane_size = (dst_width + b * 2) * (dst_height + b * 2) * 4LL;
@@ -157,12 +156,10 @@ static int ARGBClipTestFilter(int src_width, int src_height,
int64 dst_argb_plane_size = (dst_width + b * 2) * (dst_height + b * 2) * 4;
int dst_stride_argb = (b * 2 + dst_width) * 4;
- srandom(time(NULL));
-
int i, j;
for (i = b; i < (Abs(src_height) + b); ++i) {
for (j = b; j < (Abs(src_width) + b) * 4; ++j) {
- src_argb[(i * src_stride_argb) + j] = (random() & 0xff);
+ src_argb[(i * src_stride_argb) + j] = (fastrand() & 0xff);
}
}
« no previous file with comments | « unit_test/rotate_test.cc ('k') | unit_test/scale_color_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698