Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #ifndef DMUtil_DEFINED | 1 #ifndef DMUtil_DEFINED |
| 2 #define DMUtil_DEFINED | 2 #define DMUtil_DEFINED |
| 3 | 3 |
| 4 #include "SkBenchmark.h" | 4 #include "SkBenchmark.h" |
| 5 #include "SkBitmap.h" | 5 #include "SkBitmap.h" |
| 6 #include "SkString.h" | 6 #include "SkString.h" |
| 7 #include "gm_expectations.h" | 7 #include "gm_expectations.h" |
| 8 | 8 |
| 9 class SkBBHFactory; | 9 class SkBBHFactory; |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 21 SkBBHFactory* factory = NULL); | 21 SkBBHFactory* factory = NULL); |
| 22 | 22 |
| 23 // Allocate an empty bitmap with this size and depth. | 23 // Allocate an empty bitmap with this size and depth. |
| 24 void AllocatePixels(SkColorType, int w, int h, SkBitmap* bitmap); | 24 void AllocatePixels(SkColorType, int w, int h, SkBitmap* bitmap); |
| 25 // Allocate an empty bitmap the same size and depth as reference. | 25 // Allocate an empty bitmap the same size and depth as reference. |
| 26 void AllocatePixels(const SkBitmap& reference, SkBitmap* bitmap); | 26 void AllocatePixels(const SkBitmap& reference, SkBitmap* bitmap); |
| 27 | 27 |
| 28 // Draw picture to bitmap. | 28 // Draw picture to bitmap. |
| 29 void DrawPicture(SkPicture* picture, SkBitmap* bitmap); | 29 void DrawPicture(SkPicture* picture, SkBitmap* bitmap); |
| 30 | 30 |
| 31 // What is the maximum component difference in these bitmaps? | |
| 32 unsigned MaxComponentDifference(const SkBitmap& a, const SkBitmap& b); | |
|
reed1
2014/05/16 12:30:00
For the future, it might prove useful to return 4
mtklein
2014/05/16 13:00:53
Agreed.
| |
| 33 | |
| 31 // Are these identical bitmaps? | 34 // Are these identical bitmaps? |
| 32 bool BitmapsEqual(const SkBitmap& a, const SkBitmap& b); | 35 bool BitmapsEqual(const SkBitmap& a, const SkBitmap& b); |
| 33 | 36 |
| 34 } // namespace DM | 37 } // namespace DM |
| 35 | 38 |
| 36 #endif // DMUtil_DEFINED | 39 #endif // DMUtil_DEFINED |
| OLD | NEW |