| Index: dm/DMUtil.cpp
|
| diff --git a/dm/DMUtil.cpp b/dm/DMUtil.cpp
|
| index 849d1bf9d8acb2613585f0fc33d086dc9f854008..5a849fb5f6224031cce91b56e947ec6bdffea596 100644
|
| --- a/dm/DMUtil.cpp
|
| +++ b/dm/DMUtil.cpp
|
| @@ -19,13 +19,19 @@ void RecordPicture(skiagm::GM* gm, SkPicture* picture, uint32_t recordFlags) {
|
| picture->endRecording();
|
| }
|
|
|
| -void SetupBitmap(const SkColorType ct, skiagm::GM* gm, SkBitmap* bitmap) {
|
| - const SkISize size = gm->getISize();
|
| - bitmap->allocPixels(SkImageInfo::Make(size.width(), size.height(),
|
| - ct, kPremul_SkAlphaType));
|
| +static void setup_bitmap(SkColorType ct, int width, int height, SkBitmap* bitmap) {
|
| + bitmap->allocPixels(SkImageInfo::Make(width, height, ct, kPremul_SkAlphaType));
|
| bitmap->eraseColor(0x00000000);
|
| }
|
|
|
| +void SetupBitmap(const SkColorType ct, skiagm::GM* gm, SkBitmap* bitmap) {
|
| + setup_bitmap(ct, gm->getISize().width(), gm->getISize().height(), bitmap);
|
| +}
|
| +
|
| +void SetupBitmap(const SkColorType ct, SkBenchmark* bench, SkBitmap* bitmap) {
|
| + setup_bitmap(ct, bench->getSize().x(), bench->getSize().y(), bitmap);
|
| +}
|
| +
|
| void DrawPicture(SkPicture* picture, SkBitmap* bitmap) {
|
| SkASSERT(picture != NULL);
|
| SkASSERT(bitmap != NULL);
|
|
|