Index: tools/fiddle/fiddle_main.cpp |
diff --git a/tools/fiddle/fiddle_main.cpp b/tools/fiddle/fiddle_main.cpp |
index bf7a032b446aaf39cf3fa09cd69330d5887c75f0..f6270daaa59ae3935a4e095ed53742ff01a3d854 100644 |
--- a/tools/fiddle/fiddle_main.cpp |
+++ b/tools/fiddle/fiddle_main.cpp |
@@ -6,6 +6,7 @@ |
*/ |
#include <stdio.h> |
+#include <stdlib.h> |
#include <GL/osmesa.h> |
@@ -111,6 +112,7 @@ int main() { |
if (options.raster) { |
auto rasterSurface = |
SkSurface::MakeRaster(SkImageInfo::MakeN32Premul(options.size)); |
+ srand(0); |
draw(rasterSurface->getCanvas()); |
rasterData.reset(encode_snapshot(rasterSurface)); |
} |
@@ -128,6 +130,7 @@ int main() { |
fputs("Unable to get render surface.\n", stderr); |
exit(1); |
} |
+ srand(0); |
draw(surface->getCanvas()); |
gpuData.reset(encode_snapshot(surface)); |
} |
@@ -138,6 +141,7 @@ int main() { |
if (options.pdf) { |
SkDynamicMemoryWStream pdfStream; |
sk_sp<SkDocument> document(SkDocument::MakePDF(&pdfStream)); |
+ srand(0); |
draw(document->beginPage(options.size.width(), options.size.height())); |
document->close(); |
pdfData.reset(pdfStream.copyToData()); |
@@ -146,6 +150,7 @@ int main() { |
SkSize size; |
size = options.size; |
SkPictureRecorder recorder; |
+ srand(0); |
draw(recorder.beginRecording(size.width(), size.height())); |
auto picture = recorder.finishRecordingAsPicture(); |
SkDynamicMemoryWStream skpStream; |