diff options
author | Mike Reed <reed@google.com> | 2017-03-31 09:20:50 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-03-31 15:39:31 +0000 |
commit | 2e491a6a113c5e16a3b7bede5fa6f588deeb928d (patch) | |
tree | e8540e14d4ca1dd12ca3b2df5d9ef0b6f48b3a7f /gm/encode-srgb.cpp | |
parent | f3333c89bf05fc602d9bf8e1e24547668c660383 (diff) |
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 <reed@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
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)) + |