Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Side by Side Diff: dm/DMUtil.h

Issue 788243008: Sketch DM refactor. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: better failure messages, disable a few things temporarily to try to go green Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « dm/DMTestTask.cpp ('k') | dm/DMUtil.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #ifndef DMUtil_DEFINED
2 #define DMUtil_DEFINED
3
4 #include "SkBitmap.h"
5 #include "SkCanvas.h"
6 #include "SkString.h"
7 #include "gm.h"
8
9 class SkBBHFactory;
10
11 // Small free functions used in more than one place in DM.
12
13 namespace DM {
14
15 // UnderJoin("a", "b") -> "a_b"
16 SkString UnderJoin(const char* a, const char* b);
17
18 // "foo_bar.skp" -> "foo-bar_skp"
19 SkString FileToTaskName(SkString);
20
21 // Draw gm to picture.
22 SkPicture* RecordPicture(skiagm::GM* gm, SkBBHFactory* factory = NULL);
23
24 // Allocate an empty bitmap with this size and depth.
25 void AllocatePixels(SkColorType, int w, int h, SkBitmap* bitmap);
26 // Allocate an empty bitmap the same size and depth as reference.
27 void AllocatePixels(const SkBitmap& reference, SkBitmap* bitmap);
28
29 // Draw picture to bitmap.
30 void DrawPicture(const SkPicture& picture, SkBitmap* bitmap);
31
32 // What is the maximum component difference in these bitmaps?
33 unsigned MaxComponentDifference(const SkBitmap& a, const SkBitmap& b);
34
35 // Are these identical bitmaps?
36 bool BitmapsEqual(const SkBitmap& a, const SkBitmap& b);
37
38 // Hook to modify canvas using global flag values (e.g. --matrix).
39 void CanvasPreflight(SkCanvas*);
40
41 } // namespace DM
42
43 #endif // DMUtil_DEFINED
OLDNEW
« no previous file with comments | « dm/DMTestTask.cpp ('k') | dm/DMUtil.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698