From 2e491a6a113c5e16a3b7bede5fa6f588deeb928d Mon Sep 17 00:00:00 2001 From: Mike Reed Date: Fri, 31 Mar 2017 09:20:50 -0400 Subject: clean up (partially) colortable api Needs this to land: https://codereview.chromium.org/2789853002/ Bug: skia: Change-Id: I38d916a546b7fa64d000d973e695ddda24a589e7 Reviewed-on: https://skia-review.googlesource.com/10600 Commit-Queue: Mike Reed Reviewed-by: Matt Sarett --- gm/encode-srgb.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gm/encode-srgb.cpp') 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 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)) + -- cgit v1.2.3