OLD | NEW |
1 #include "DMUtil.h" | 1 #include "DMUtil.h" |
2 | 2 |
3 #include "SkPicture.h" | 3 #include "SkPicture.h" |
| 4 #include "SkPictureRecorder.h" |
4 | 5 |
5 namespace DM { | 6 namespace DM { |
6 | 7 |
7 SkString UnderJoin(const char* a, const char* b) { | 8 SkString UnderJoin(const char* a, const char* b) { |
8 SkString s; | 9 SkString s; |
9 s.appendf("%s_%s", a, b); | 10 s.appendf("%s_%s", a, b); |
10 return s; | 11 return s; |
11 } | 12 } |
12 | 13 |
13 SkPicture* RecordPicture(skiagm::GM* gm, uint32_t recordFlags, SkBBHFactory* fac
tory) { | 14 SkPicture* RecordPicture(skiagm::GM* gm, uint32_t recordFlags, SkBBHFactory* fac
tory) { |
(...skipping 26 matching lines...) Expand all Loading... |
40 canvas.drawPicture(*picture); | 41 canvas.drawPicture(*picture); |
41 canvas.flush(); | 42 canvas.flush(); |
42 } | 43 } |
43 | 44 |
44 bool BitmapsEqual(const SkBitmap& a, const SkBitmap& b) { | 45 bool BitmapsEqual(const SkBitmap& a, const SkBitmap& b) { |
45 const SkAutoLockPixels lockA(a), lockB(b); | 46 const SkAutoLockPixels lockA(a), lockB(b); |
46 return a.getSize() == b.getSize() && 0 == memcmp(a.getPixels(), b.getPixels(
), b.getSize()); | 47 return a.getSize() == b.getSize() && 0 == memcmp(a.getPixels(), b.getPixels(
), b.getSize()); |
47 } | 48 } |
48 | 49 |
49 } // namespace DM | 50 } // namespace DM |
OLD | NEW |