diff options
Diffstat (limited to 'gm/image_pict.cpp')
-rw-r--r-- | gm/image_pict.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gm/image_pict.cpp b/gm/image_pict.cpp index f23b89e728..792173ce66 100644 --- a/gm/image_pict.cpp +++ b/gm/image_pict.cpp @@ -199,7 +199,8 @@ static std::unique_ptr<SkImageGenerator> make_ctable_generator(GrContext*, sk_sp SkImageInfo info = SkImageInfo::Make(100, 100, kIndex_8_SkColorType, kPremul_SkAlphaType); SkBitmap bm2; - bm2.allocPixels(info, SkColorTable::Make(colors, count)); + sk_sp<SkColorTable> ct(new SkColorTable(colors, count)); + bm2.allocPixels(info, nullptr, ct.get()); for (int y = 0; y < info.height(); ++y) { for (int x = 0; x < info.width(); ++x) { *bm2.getAddr8(x, y) = find_closest(*bm.getAddr32(x, y), colors, count); |