6 #include "gm_expectations.h"
10 // Small free functions used in more than one place in DM.
14 // UnderJoin("a", "b") -> "a_b"
15 SkString UnderJoin(const char* a, const char* b);
17 // "foo_bar.skp" -> "foo-bar_skp"
18 SkString FileToTaskName(SkString);
20 // Draw gm to picture. If skr is true, uses EXPERIMENTAL_beginRecording().
21 SkPicture* RecordPicture(skiagm::GM* gm,
22 SkBBHFactory* factory = NULL,
25 // Allocate an empty bitmap with this size and depth.
26 void AllocatePixels(SkColorType, int w, int h, SkBitmap* bitmap);
27 // Allocate an empty bitmap the same size and depth as reference.
28 void AllocatePixels(const SkBitmap& reference, SkBitmap* bitmap);
30 // Draw picture to bitmap.
31 void DrawPicture(const SkPicture& picture, SkBitmap* bitmap);
33 // What is the maximum component difference in these bitmaps?
34 unsigned MaxComponentDifference(const SkBitmap& a, const SkBitmap& b);
36 // Are these identical bitmaps?
37 bool BitmapsEqual(const SkBitmap& a, const SkBitmap& b);
41 #endif // DMUtil_DEFINED