| Index: bench/subset/SubsetSingleBench.cpp
|
| diff --git a/bench/subset/SubsetSingleBench.cpp b/bench/subset/SubsetSingleBench.cpp
|
| index 68c94cd246b125a27ba26e6bec7a2f6409006bb4..2bddbdcc23aa85027f1c67459b3b5c2f7f6271b5 100644
|
| --- a/bench/subset/SubsetSingleBench.cpp
|
| +++ b/bench/subset/SubsetSingleBench.cpp
|
| @@ -59,7 +59,7 @@ bool SubsetSingleBench::isSuitableFor(Backend backend) {
|
| void SubsetSingleBench::onDraw(const int n, SkCanvas* canvas) {
|
| // When the color type is kIndex8, we will need to store the color table. If it is
|
| // used, it will be initialized by the codec.
|
| - int colorCount;
|
| + int colorCount = 0;
|
| SkPMColor colors[256];
|
| if (fUseCodec) {
|
| for (int count = 0; count < n; count++) {
|
| @@ -70,7 +70,8 @@ void SubsetSingleBench::onDraw(const int n, SkCanvas* canvas) {
|
| info, NULL, colors, &colorCount);
|
|
|
| SkBitmap bitmap;
|
| - bitmap.allocPixels(info.makeWH(fSubsetWidth, fSubsetHeight));
|
| + bitmap.allocPixels(info.makeWH(fSubsetWidth, fSubsetHeight), NULL,
|
| + SkNEW_ARGS(SkColorTable, (colors, colorCount)));
|
|
|
| scanlineDecoder->skipScanlines(fOffsetTop);
|
| uint32_t bpp = info.bytesPerPixel();
|
|
|