diff options
Diffstat (limited to 'samplecode/SampleBlur.cpp')
-rw-r--r-- | samplecode/SampleBlur.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/samplecode/SampleBlur.cpp b/samplecode/SampleBlur.cpp index c43dc9bd43..7e6a32562d 100644 --- a/samplecode/SampleBlur.cpp +++ b/samplecode/SampleBlur.cpp @@ -4,7 +4,6 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ - #include "SampleCode.h" #include "SkBlurMask.h" #include "SkBlurMaskFilter.h" @@ -21,9 +20,12 @@ static SkBitmap make_bitmap() { } SkBitmap bm; + SkColorTable* ctable = new SkColorTable(c, 256); + bm.allocPixels(SkImageInfo::Make(256, 256, kIndex_8_SkColorType, kPremul_SkAlphaType), - SkColorTable::Make(c, 256)); + nullptr, ctable); + ctable->unref(); bm.lockPixels(); const float cx = bm.width() * 0.5f; |