aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/picture_utils.h
diff options
context:
space:
mode:
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