skia2/tools/skpdiff
mtklein 00b621cfc0 Add sk_parallel_for()
This should be a drop-in replacement for most for-loops to make them run in parallel:
   for (int i = 0; i < N; i++) { code... }
   ~~~>
   sk_parallel_for(N, [&](int i) { code... });

This is just syntax sugar over SkTaskGroup to make this use case really easy to write.
There's no more overhead that we weren't already forced to add using an interface like batch(),
and no extra heap allocations.

I've replaced 3 uses of SkTaskGroup with sk_parallel_for:
  1) My unit tests for SkOnce.
  2) Cary's path fuzzer.
  3) SkMultiPictureDraw.
Performance should be the same.  Please compare left and right for readability. :)

BUG=skia:

No public API changes.
TBR=reed@google.com

Review URL: https://codereview.chromium.org/1184373003
2015-06-17 15:26:15 -07:00
..
diff_viewer.js The default size of mask canvas is not appropriate. its height is too small: 150, while its width is 300. As a result, for non-alphaMask canvas who doesn't update the mask canvas size, this tool just magnify the upper part of 'Expected Image' as well as 'Actual Image' when user open view.html to show skpdiff_output.json in browser for many cases. The other part can't be shown because it is out of the mask canvas. This CL update non-alphaMask canvas size according to baseline canvas for each case, then the tool can magnify anywhere you want for the whole image when you click and move mouse on the mask canvas. 2013-12-12 14:55:45 +00:00
generate_pmetric_tables.py
README
SkCLImageDiffer.cpp stop using SkBitmap::Config 2014-06-14 05:30:20 -07:00
SkCLImageDiffer.h C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla} 2015-03-25 18:17:32 -07:00
SkDiffContext.cpp Add sk_parallel_for() 2015-06-17 15:26:15 -07:00
SkDiffContext.h This eliminates the need to copy the generated images from a temporary directory to the directory that is served by the rebaseline_server. 2014-08-13 10:36:06 -07:00
SkDifferentPixelsMetric_cpu.cpp rebaseline_server: use just skpdiff, not Python Image Library 2014-07-02 07:43:04 -07:00
SkDifferentPixelsMetric_opencl.cpp rebaseline_server: use just skpdiff, not Python Image Library 2014-07-02 07:43:04 -07:00
SkDifferentPixelsMetric.h C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla} 2015-03-25 18:17:32 -07:00
SkImageDiffer.cpp Remove unnecessary includes. 2013-11-18 17:27:16 +00:00
SkImageDiffer.h rebaseline_server: use just skpdiff, not Python Image Library 2014-07-02 07:43:04 -07:00
skpdiff_main.cpp Remove all code related to NaCl 2015-04-02 12:16:36 -07:00
skpdiff_server.py
skpdiff_util.cpp Fix usage of SK_BUILD_* defines. 2014-10-06 10:46:51 -07:00
skpdiff_util.h Fix usage of SK_BUILD_* defines. 2014-10-06 10:46:51 -07:00
SkPMetric.cpp rebaseline_server: use just skpdiff, not Python Image Library 2014-07-02 07:43:04 -07:00
SkPMetric.h C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla} 2015-03-25 18:17:32 -07:00
SkPMetricUtil_generated.h
viewer_style.css Update skpdiff to include a name with each file. 2013-10-16 15:00:11 +00:00
viewer.html update skpdiff visualization (image magnification with alpha mask) 2013-11-07 19:24:06 +00:00

Some example invocations:

Note how the asterisks are not expanded inside the shell because of the quotes

out/Debug/skpdiff -p \
                  "/usr/local/google/home/zachr/Downloads/gm/*_8888.png" \
                  "/usr/local/google/home/zachr/Downloads/gm/*_gpu.png"


out/Debug/skpdiff --differs different_pixels -f \
                  "/usr/local/google/home/zachr/Downloads/diffs/baseline" \
                  "/usr/local/google/home/zachr/Downloads/diffs/test"