skia2/gyp
commit-bot@chromium.org 99589af4e3 Add support for reading a directory of images with --expectations (-r).
DM writes out its images in a hierarchy that's a little different than GM,
so this can't read GM's output.  But it can read its own, written with -w.

Example usage:
  $ out/Release/dm -w /tmp/baseline
  $ out/Release/dm -r /tmp/baseline -w /tmp/new
  (and optionally)
  $ mkdir /tmp/diff; out/Release/skdiff /tmp/baseline /tmp/new /tmp/diff

GM's IndividualImageExpectationsSource and Expectations are a little too eager
about decoding and hashing the expected images, so I took the opportunity to
add DM::Expectations that mostly replaces skiagm::ExpectationsSource and
skiagm::Expectations in DM.  It mainly exists to move the image decoding and
comparison off the main thread, which would otherwise be a major speed
bottleneck.

I tried to use skiagm code where possible.  One notable place where I differed
is in this new feature.  When -r is a directory of images, DM does no hashing.
It considerably faster to read the expected file into an SkBitmap and do a
byte-for-byte comparison than to hash the two bitmaps and check those.

The example usage above isn't quite working 100% yet.  Expectations on some GMs
fail, even with no binary change.  I haven't pinned down whether this is due to
  - a bug in DM
  - flaky GMs
  - unthreadsafe GMs
  - flaky image decoding
  - unthreadsafe image decoding
  - something else
but I intend to.  Leon, Derek and I have suspected PNG decoding isn't
threadsafe, but are as yet unable to prove it.

I also seem to be able to cause malloc to fail on my laptop if I run too many
configs at once, though I never seem to be using more than ~1G of RAM.  Will
track that down too.

BUG=
R=reed@google.com, bsalomon@google.com

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/108963002

git-svn-id: http://skia.googlecode.com/svn/trunk@12596 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-10 14:53:16 +00:00
..
android_deps.gyp Update DEPS and GYP to use the copy of Android in platform_tools. 2013-05-02 12:27:21 +00:00
android_system.gyp Update DEPS and GYP to use the copy of Android in platform_tools. 2013-05-02 12:27:21 +00:00
angle.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
animator.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
apptype_console.gypi Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
bench.gyp Add JSON output option to bench. 2013-12-03 18:16:48 +00:00
chromeos_deps.gyp GYP Changes and Scripts for Compiling Skia for ChromeOS 2013-06-11 15:52:19 +00:00
common_conditions.gypi Fix #define for distance field fonts 2013-12-06 18:05:03 +00:00
common_variables.gypi Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
common.gypi Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
core.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
core.gypi make info real in SkPixelRef, and add bitmap::asImageInfo 2013-12-09 22:01:03 +00:00
debugger.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
dm.gyp Add support for reading a directory of images with --expectations (-r). 2013-12-10 14:53:16 +00:00
edtaa.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
effects.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
effects.gypi Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
everything.gyp V8 and Skia 2013-12-05 13:45:19 +00:00
experimental.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
FileReaderApp.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
flags.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
fontconfig.gyp Sanitizing source files in Housekeeper-Nightly 2013-08-21 07:01:29 +00:00
freetype.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
freetype.gypi Sanitizing source files in Housekeeper-Nightly 2013-08-21 07:01:29 +00:00
gm.gyp Big Cleanup: SkBitmapFactory, SkLazyPixelRef, SkImageCache 2013-12-05 18:31:42 +00:00
gmslides.gypi Implement srcRect and dstRect functionality in SkBitmapSource. This is required for the "preserveAspectRatio" options of SVG's feImage. Covered by new GM "bitmapsource". 2013-12-09 18:31:42 +00:00
gpu.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
gpu.gypi fix file names in gpu.gypi 2013-12-09 18:48:51 +00:00
gputest.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
iconv.gyp Sanitizing source files in Housekeeper-Nightly 2013-08-21 07:01:29 +00:00
images.gyp Big Cleanup: SkBitmapFactory, SkLazyPixelRef, SkImageCache 2013-12-05 18:31:42 +00:00
jsoncpp.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
libjpeg.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
libwebp.gyp A fix for annoying clang error "unused-const-variabl" in third_party code. 2013-10-28 22:05:12 +00:00
lua.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
most.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
nacl.gyp Prepare skia for shared library build on android 2013-06-03 12:10:19 +00:00
opts.gyp Add support for MIPS to android build 2013-12-10 12:53:56 +00:00
pathops_unittest.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
pathops_unittest.gypi path ops work in progress 2013-10-02 14:49:34 +00:00
pathops.gypi path ops work in progress 2013-09-16 15:55:01 +00:00
pdf.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
pdf.gypi Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
pdfviewer_lib.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
pdfviewer.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
pixman_test.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
poppler.gyp Add extra warnings to match what Android uses. 2013-11-20 15:13:49 +00:00
ports.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
public_headers.gypi Big Cleanup: SkBitmapFactory, SkLazyPixelRef, SkImageCache 2013-12-05 18:31:42 +00:00
SampleApp.gyp Big Cleanup: SkBitmapFactory, SkLazyPixelRef, SkImageCache 2013-12-05 18:31:42 +00:00
sfnt.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
shapeops_demo.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
shapeops_edge.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
shapeops_tool.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
SimpleCocoaApp.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
SimpleiOSApp.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
skia_lib.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
skpskgr_test.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
svg.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
tests.gyp Big Cleanup: SkBitmapFactory, SkLazyPixelRef, SkImageCache 2013-12-05 18:31:42 +00:00
tools.gyp Big Cleanup: SkBitmapFactory, SkLazyPixelRef, SkImageCache 2013-12-05 18:31:42 +00:00
utils.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
v8.gyp Add Windows compilation support to V8 example 2013-12-05 15:55:00 +00:00
views_animated.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
views.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
xml.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
xps.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00
zlib.gyp Remove the comments settings for vim tab width and expansion variables. 2013-12-02 22:23:03 +00:00