diff options
author | 2017-03-31 16:45:04 +0000 | |
---|---|---|
committer | 2017-03-31 16:45:09 +0000 | |
commit | 1d1165ca6575e082b892c5460492c411618783ad (patch) | |
tree | d0c8be9303b4033e2eac559a104a9c1129430dbd /samplecode/SampleTinyBitmap.cpp | |
parent | 43e5fd3e2095aa47630ff3a8b6da4139968d0492 (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 'samplecode/SampleTinyBitmap.cpp')
-rw-r--r-- | samplecode/SampleTinyBitmap.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/samplecode/SampleTinyBitmap.cpp b/samplecode/SampleTinyBitmap.cpp index 6b01d11d5a..4fb508b898 100644 --- a/samplecode/SampleTinyBitmap.cpp +++ b/samplecode/SampleTinyBitmap.cpp @@ -19,11 +19,13 @@ static SkBitmap make_bitmap() { for (int i = 0; i < N; i++) { c[i] = SkPackARGB32(0x80, 0x80, 0, 0); } + SkColorTable* ctable = new SkColorTable(c, N); SkBitmap bm; bm.allocPixels(SkImageInfo::Make(1, 1, kIndex_8_SkColorType, kPremul_SkAlphaType), - SkColorTable::Make(c, N)); + nullptr, ctable); + ctable->unref(); bm.lockPixels(); for (int y = 0; y < bm.height(); y++) { |