| OLD | NEW | 
|---|
| 1 #ifndef DMUtil_DEFINED | 1 #ifndef DMUtil_DEFINED | 
| 2 #define DMUtil_DEFINED | 2 #define DMUtil_DEFINED | 
| 3 | 3 | 
| 4 #include "SkBitmap.h" | 4 #include "SkBitmap.h" | 
| 5 #include "SkString.h" | 5 #include "SkString.h" | 
| 6 #include "gm_expectations.h" | 6 #include "gm_expectations.h" | 
| 7 | 7 | 
| 8 // Small free functions used in more than one place in DM. | 8 // Small free functions used in more than one place in DM. | 
| 9 | 9 | 
| 10 namespace DM { | 10 namespace DM { | 
| 11 | 11 | 
| 12 // UnderJoin("a", "b") -> "a_b" | 12 // UnderJoin("a", "b") -> "a_b" | 
| 13 SkString UnderJoin(const char* a, const char* b); | 13 SkString UnderJoin(const char* a, const char* b); | 
| 14 | 14 | 
| 15 // Png("a") -> "a.png" | 15 // Png("a") -> "a.png" | 
| 16 SkString Png(SkString s); | 16 SkString Png(SkString s); | 
| 17 | 17 | 
| 18 // Roughly, expectations.match(GmResultDigest(bitmap)), but calculates the diges
    t lazily. | 18 // Roughly, expectations.match(GmResultDigest(bitmap)), but calculates the diges
    t lazily. | 
| 19 bool MeetsExpectations(const skiagm::Expectations& expectations, const SkBitmap 
    bitmap); | 19 bool MeetsExpectations(const skiagm::Expectations& expectations, const SkBitmap 
    bitmap); | 
| 20 | 20 | 
| 21 // Draw gm to picture. | 21 // Draw gm to picture.  Passes recordFlags to SkPicture::beginRecording(). | 
| 22 void RecordPicture(skiagm::GM* gm, SkPicture* picture); | 22 void RecordPicture(skiagm::GM* gm, SkPicture* picture, uint32_t recordFlags = 0)
    ; | 
| 23 | 23 | 
| 24 // Prepare bitmap to have gm draw into it with this config. | 24 // Prepare bitmap to have gm draw into it with this config. | 
| 25 void SetupBitmap(const SkBitmap::Config config, skiagm::GM* gm, SkBitmap* bitmap
    ); | 25 void SetupBitmap(const SkBitmap::Config config, skiagm::GM* gm, SkBitmap* bitmap
    ); | 
| 26 | 26 | 
| 27 // Draw picture to bitmap. | 27 // Draw picture to bitmap. | 
| 28 void DrawPicture(SkPicture* picture, SkBitmap* bitmap); | 28 void DrawPicture(SkPicture* picture, SkBitmap* bitmap); | 
| 29 | 29 | 
| 30 // Are these identical bitmaps? | 30 // Are these identical bitmaps? | 
| 31 bool BitmapsEqual(const SkBitmap& a, const SkBitmap& b); | 31 bool BitmapsEqual(const SkBitmap& a, const SkBitmap& b); | 
| 32 | 32 | 
| 33 }  // namespace DM | 33 }  // namespace DM | 
| 34 | 34 | 
| 35 #endif  // DMUtil_DEFINED | 35 #endif  // DMUtil_DEFINED | 
| OLD | NEW | 
|---|