From 6b3155c4be0476bc53541b0431c368a44e69f0a7 Mon Sep 17 00:00:00 2001 From: Mike Reed Date: Mon, 3 Apr 2017 14:41:44 -0400 Subject: Revert[4] "clean up (partially) colortable api"""" Fixes: - create temp api for android to pass nullptr - don't release and access sk_sp at the same time in parameters This reverts commit b14131c1851eea6acbd34cc42a8f860daed36b21. Bug: skia: Change-Id: Ic0e4f62520ba9f35455499ed30d306ad19d998a8 Reviewed-on: https://skia-review.googlesource.com/11129 Commit-Queue: Mike Reed Reviewed-by: Matt Sarett --- gm/image_pict.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gm/image_pict.cpp') diff --git a/gm/image_pict.cpp b/gm/image_pict.cpp index 792173ce66..f23b89e728 100644 --- a/gm/image_pict.cpp +++ b/gm/image_pict.cpp @@ -199,8 +199,7 @@ static std::unique_ptr make_ctable_generator(GrContext*, sk_sp SkImageInfo info = SkImageInfo::Make(100, 100, kIndex_8_SkColorType, kPremul_SkAlphaType); SkBitmap bm2; - sk_sp ct(new SkColorTable(colors, count)); - bm2.allocPixels(info, nullptr, ct.get()); + bm2.allocPixels(info, SkColorTable::Make(colors, count)); 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); -- cgit v1.2.3