From 9299eded3838a7997235ff033aa3b9a8d4c6d4d4 Mon Sep 17 00:00:00 2001 From: "keyar@chromium.org" Date: Tue, 21 Aug 2012 19:05:08 +0000 Subject: Images are written by PictureRenderer and not render_pictures_main. Review URL: https://codereview.appspot.com/6448174 git-svn-id: http://skia.googlecode.com/svn/trunk@5216 2bbb7eff-a529-9590-31e7-b0007b416f81 --- tools/picture_utils.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'tools/picture_utils.h') diff --git a/tools/picture_utils.h b/tools/picture_utils.h index c0c5d8f069..18352f2bdf 100644 --- a/tools/picture_utils.h +++ b/tools/picture_utils.h @@ -15,6 +15,14 @@ class SkString; class SkPicture; namespace sk_tools { + // since PNG insists on unpremultiplying our alpha, we take no precision + // chances and force all pixels to be 100% opaque, otherwise on compare we + // may not get a perfect match. + // + // This expects a bitmap with a config type of 8888 and for the pixels to + // not be on the GPU. + void force_all_opaque(const SkBitmap& bitmap); + // Creates a posix style filepath by concatenating name onto dir with a // forward slash into path. void make_filepath(SkString* path, const SkString&, const SkString& name); @@ -22,7 +30,7 @@ namespace sk_tools { // Returns the last part of the path (file name or leaf directory name) // // This basically just looks for a foward slash or backslash (windows - // only) + // only). void get_basename(SkString* basename, const SkString& path); // Returns true if the string ends with % -- cgit v1.2.3