aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/picture_utils.h
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-15 15:10:48 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-15 15:10:48 +0000
commit3f0451772109959fcb79bacf2c9a03e0eb39ff27 (patch)
tree19e1b86cc9824172c7f1c422591cc51314203fdb /tools/picture_utils.h
parent76ac7f81d39a99616541ead9c40aa6d208b517af (diff)
render_pictures: add --mismatchPath flag
When set, it will only write out images that don't match expectations. BUG=skia:1942 R=rmistry@google.com Author: epoger@google.com Review URL: https://codereview.chromium.org/283123002 git-svn-id: http://skia.googlecode.com/svn/trunk@14748 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tools/picture_utils.h')
-rw-r--r--tools/picture_utils.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/tools/picture_utils.h b/tools/picture_utils.h
index 02eee285d0..c0e0d2c8dd 100644
--- a/tools/picture_utils.h
+++ b/tools/picture_utils.h
@@ -53,6 +53,20 @@ namespace sk_tools {
// Specifically, it configures the bitmap, allocates pixels and then
// erases the pixels to transparent black.
void setup_bitmap(SkBitmap* bitmap, int width, int height);
-}
+
+ /**
+ * Write a bitmap file to disk.
+ *
+ * @param bm the bitmap to record
+ * @param dirPath directory within which to write the image file
+ * @param subdirOrNull subdirectory within dirPath, or NULL to just write into dirPath
+ * @param baseName last part of the filename
+ *
+ * @return true if written out successfully
+ */
+ bool write_bitmap_to_disk(const SkBitmap& bm, const SkString& dirPath,
+ const char *subdirOrNull, const SkString& baseName);
+
+} // namespace sk_tools
#endif // picture_utils_DEFINED