aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/all_bitmap_configs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gm/all_bitmap_configs.cpp')
-rw-r--r--gm/all_bitmap_configs.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/gm/all_bitmap_configs.cpp b/gm/all_bitmap_configs.cpp
index 60aec88ddf..ea7b73483b 100644
--- a/gm/all_bitmap_configs.cpp
+++ b/gm/all_bitmap_configs.cpp
@@ -124,9 +124,10 @@ static SkBitmap indexed_bitmap() {
pmColors[i] = premultiply_color(colors[i]);
}
SkBitmap bm;
+ sk_sp<SkColorTable> ctable(new SkColorTable(pmColors, SK_ARRAY_COUNT(pmColors)));
SkImageInfo info = SkImageInfo::Make(SCALE, SCALE, kIndex_8_SkColorType,
kPremul_SkAlphaType);
- bm.allocPixels(info, SkColorTable::Make(pmColors, SK_ARRAY_COUNT(pmColors)));
+ bm.allocPixels(info, nullptr, ctable.get());
SkAutoLockPixels autoLockPixels1(n32bitmap);
SkAutoLockPixels autoLockPixels2(bm);
for (int y = 0; y < SCALE; ++y) {