Chromium Code Reviews| Index: bench/subset/SubsetSingleBench.cpp |
| diff --git a/bench/subset/SubsetSingleBench.cpp b/bench/subset/SubsetSingleBench.cpp |
| index 68c94cd246b125a27ba26e6bec7a2f6409006bb4..697eabb75d5b79bc7ab6a2b34a612c37b5af9637 100644 |
| --- a/bench/subset/SubsetSingleBench.cpp |
| +++ b/bench/subset/SubsetSingleBench.cpp |
| @@ -70,7 +70,12 @@ void SubsetSingleBench::onDraw(const int n, SkCanvas* canvas) { |
| info, NULL, colors, &colorCount); |
| SkBitmap bitmap; |
| - bitmap.allocPixels(info.makeWH(fSubsetWidth, fSubsetHeight)); |
| + if (kIndex_8_SkColorType == fColorType) { |
|
scroggo
2015/06/30 16:40:19
I agree that this is better (I think in patch set
msarett
2015/06/30 18:40:28
Acknowledged.
|
| + bitmap.allocPixels(info.makeWH(fSubsetWidth, fSubsetHeight), NULL, |
| + SkNEW_ARGS(SkColorTable, (colors, colorCount))); |
|
scroggo
2015/06/30 16:40:19
According to the documentation for tryAllocPixels
msarett
2015/06/30 18:40:27
You're right. Sorry should have put a little more
|
| + } else { |
| + bitmap.allocPixels(info.makeWH(fSubsetWidth, fSubsetHeight)); |
| + } |
| scanlineDecoder->skipScanlines(fOffsetTop); |
| uint32_t bpp = info.bytesPerPixel(); |