diff options
Diffstat (limited to 'gm/encode-srgb.cpp')
-rw-r--r-- | gm/encode-srgb.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gm/encode-srgb.cpp b/gm/encode-srgb.cpp index f62d48ae2c..894b0ef8d5 100644 --- a/gm/encode-srgb.cpp +++ b/gm/encode-srgb.cpp @@ -67,10 +67,9 @@ static void make_index8(SkBitmap* bitmap, SkAlphaType alphaType, sk_sp<SkColorSp pmColors[i] = toPMColor(colors[i]); } - sk_sp<SkColorTable> colorTable(new SkColorTable(pmColors, SK_ARRAY_COUNT(pmColors))); SkImageInfo info = SkImageInfo::Make(imageWidth, imageHeight, kIndex_8_SkColorType, alphaType, colorSpace); - bitmap->allocPixels(info, nullptr, colorTable.get()); + bitmap->allocPixels(info, SkColorTable::Make(pmColors, SK_ARRAY_COUNT(pmColors))); for (int y = 0; y < imageHeight; y++) { for (int x = 0; x < imageWidth; x++) { *bitmap->getAddr8(x, y) = (x / div_round_up(imageWidth, 2)) + |