| Index: bench/nanobench.cpp
|
| diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp
|
| index 054fbb27b1a795b3f22d2c03afc8a9d6e9d14cf1..de4545f2fa529e43b70a2490531c02554500b51d 100644
|
| --- a/bench/nanobench.cpp
|
| +++ b/bench/nanobench.cpp
|
| @@ -603,9 +603,12 @@ static bool valid_brd_bench(SkData* encoded, SkBitmapRegionDecoderInterface::Str
|
| return false;
|
| }
|
|
|
| - SkAutoTDelete<SkBitmap> bitmap(brd->decodeRegion(0, 0, brd->width(), brd->height(), 1,
|
| - colorType));
|
| - if (nullptr == bitmap.get() || colorType != bitmap->colorType()) {
|
| + SkBitmap bitmap;
|
| + if (!brd->decodeRegion(&bitmap, nullptr, SkIRect::MakeXYWH(0, 0, brd->width(), brd->height()),
|
| + 1, colorType, false)) {
|
| + return false;
|
| + }
|
| + if (colorType != bitmap.colorType()) {
|
| // This indicates that conversion to the requested color type is not supported for the
|
| // particular image.
|
| return false;
|
|
|