diff options
author | Mike Reed <reed@google.com> | 2017-04-01 12:14:57 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-04-01 16:46:11 +0000 |
commit | 9920b10f5292838f00600f676c4578cd11705e60 (patch) | |
tree | 9217d23bf701b4ccfd15d818bfea44b766ad4fc3 /gm/encode-srgb.cpp | |
parent | ec61785bbb989a1901b063923da30c04ed41332f (diff) |
Revert[2] "clean up (partially) colortable api""
This reverts commit 1d1165ca6575e082b892c5460492c411618783ad.
Bug: skia:
Change-Id: Idbc0634ae3cec2e79f592d252de8751b077e6408
Reviewed-on: https://skia-review.googlesource.com/11024
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@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)) + |