aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/tinybitmap.cpp
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-03-31 09:20:50 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-31 15:39:31 +0000
commit2e491a6a113c5e16a3b7bede5fa6f588deeb928d (patch)
treee8540e14d4ca1dd12ca3b2df5d9ef0b6f48b3a7f /gm/tinybitmap.cpp
parentf3333c89bf05fc602d9bf8e1e24547668c660383 (diff)
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>
Diffstat (limited to 'gm/tinybitmap.cpp')
-rw-r--r--gm/tinybitmap.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/gm/tinybitmap.cpp b/gm/tinybitmap.cpp
index 0f0f1374ea..1640cb23d1 100644
--- a/gm/tinybitmap.cpp
+++ b/gm/tinybitmap.cpp
@@ -15,13 +15,11 @@ namespace skiagm {
static SkBitmap make_bitmap() {
const SkPMColor c[] = { SkPackARGB32(0x80, 0x80, 0, 0) };
- SkColorTable* ctable = new SkColorTable(c, SK_ARRAY_COUNT(c));
SkBitmap bm;
bm.allocPixels(SkImageInfo::Make(1, 1, kIndex_8_SkColorType,
kPremul_SkAlphaType),
- nullptr, ctable);
- ctable->unref();
+ SkColorTable::Make(c, SK_ARRAY_COUNT(c)));
bm.lockPixels();
*bm.getAddr8(0, 0) = 0;