aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/gm_expectations.h
diff options
context:
space:
mode:
authorGravatar scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-10-22 00:42:46 +0000
committerGravatar scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-10-22 00:42:46 +0000
commit5187c4313cd6b1dea82c43fa5af466576e4025f1 (patch)
treed790876111b9820a9ff76491395aee78c2278f55 /gm/gm_expectations.h
parent380355eff33a011bc0c9e11c63b6b5361ac55b67 (diff)
More work to integrate skimage with rebaseline tools.
tools/skimage_main.cpp: Add the ability to write the results to checksum based filenames, much like GM uses. This will allow using the skpdiff server to rebaseline images. Write the keys in the JSON file as <original image>_<pref config>.png, so it matches gm_json.IMAGE_FILENAME_PATTERN. Also replace '_' with '-' in the original file name, to avoid confusing the pattern matcher. The '_' to '-' replacement also happens on the output filename. Read the keys in a similar manner. In make_outname, no longer remove a suffix. This fixes a bug where subset decoding writes multiple subsets to the same file. tools/rebaseline.py: Since the filenames written to json files now match gm_json.IMAGE_FILENAME_PATTERN, enable the option to match based on configs/tests when rebaselining skimage. test json files: Update to match the new format of output. gm/gm_expectations: Add a constructor that takes a BitmapAndDigest as input. tools/tests/skimage_self_test.py: Test that reading the expectations file just created by skimage with the same file actually compares to the original file (rather than just succeeding because expectations were missing). Change the expectations files to match the new format. Will require a buildbot change to use the new flag: https://codereview.chromium.org/27389002/ BUG=1466 R=epoger@google.com Review URL: https://codereview.chromium.org/26297004 git-svn-id: http://skia.googlecode.com/svn/trunk@11902 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gm/gm_expectations.h')
-rw-r--r--gm/gm_expectations.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/gm/gm_expectations.h b/gm/gm_expectations.h
index 401af0dab5..5ff009e167 100644
--- a/gm/gm_expectations.h
+++ b/gm/gm_expectations.h
@@ -116,7 +116,12 @@ namespace skiagm {
* Expect exactly one image (appropriate for the case when we
* are comparing against a single PNG file).
*/
- Expectations(const SkBitmap& bitmap, bool ignoreFailure=kDefaultIgnoreFailure);
+ explicit Expectations(const SkBitmap& bitmap, bool ignoreFailure=kDefaultIgnoreFailure);
+
+ /**
+ * Expect exactly one image, whose digest has already been computed.
+ */
+ explicit Expectations(const BitmapAndDigest& bitmapAndDigest);
/**
* Create Expectations from a JSON element as found within the