Chromium Code Reviews| Index: bench/subset/SubsetTranslateBench.cpp |
| diff --git a/bench/subset/SubsetTranslateBench.cpp b/bench/subset/SubsetTranslateBench.cpp |
| index 620b6f4903b8da291ee0c8eb34809385825fb188..182969d9a2d07700f409e40a75e135f0099abb90 100644 |
| --- a/bench/subset/SubsetTranslateBench.cpp |
| +++ b/bench/subset/SubsetTranslateBench.cpp |
| @@ -55,7 +55,7 @@ bool SubsetTranslateBench::isSuitableFor(Backend backend) { |
| void SubsetTranslateBench::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; |
|
scroggo
2015/06/30 16:40:19
This got left out of patch set 2, but according to
msarett
2015/06/30 18:40:27
I switched away from this approach because I thoug
|
| SkPMColor colors[256]; |
| if (fUseCodec) { |
| for (int count = 0; count < n; count++) { |
| @@ -68,7 +68,8 @@ void SubsetTranslateBench::onDraw(const int n, SkCanvas* canvas) { |
| SkBitmap bitmap; |
| // Note that we use the same bitmap for all of the subsets. |
| // It might be larger than necessary for the end subsets. |
| - bitmap.allocPixels(info.makeWH(fSubsetWidth, fSubsetHeight)); |
| + bitmap.allocPixels(info.makeWH(fSubsetWidth, fSubsetHeight), NULL, |
| + SkNEW_ARGS(SkColorTable, (colors, colorCount))); |
| for (int x = 0; x < info.width(); x += fSubsetWidth) { |
| for (int y = 0; y < info.height(); y += fSubsetHeight) { |