aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/image_pict.cpp
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2017-03-31 16:45:04 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-31 16:45:09 +0000
commit1d1165ca6575e082b892c5460492c411618783ad (patch)
treed0c8be9303b4033e2eac559a104a9c1129430dbd /gm/image_pict.cpp
parent43e5fd3e2095aa47630ff3a8b6da4139968d0492 (diff)
Revert "clean up (partially) colortable api"
This reverts commit 2e491a6a113c5e16a3b7bede5fa6f588deeb928d. Reason for revert: Windows unit tests failing? Original change's description: > 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> > TBR=msarett@google.com,scroggo@google.com,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I626e7edfcea82576a440dcaa851a04cedee6233f Reviewed-on: https://skia-review.googlesource.com/10966 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'gm/image_pict.cpp')
-rw-r--r--gm/image_pict.cpp3
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);