diff options
author | Mike Reed <reed@google.com> | 2017-03-31 09:20:50 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-03-31 15:39:31 +0000 |
commit | 2e491a6a113c5e16a3b7bede5fa6f588deeb928d (patch) | |
tree | e8540e14d4ca1dd12ca3b2df5d9ef0b6f48b3a7f /tests/ImageTest.cpp | |
parent | f3333c89bf05fc602d9bf8e1e24547668c660383 (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 'tests/ImageTest.cpp')
-rw-r--r-- | tests/ImageTest.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/ImageTest.cpp b/tests/ImageTest.cpp index ba49000d9a..492985c18f 100644 --- a/tests/ImageTest.cpp +++ b/tests/ImageTest.cpp @@ -568,10 +568,8 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(SkImage_drawAbandonedGpuImage, reporter, c DEF_TEST(ImageFromIndex8Bitmap, r) { SkPMColor pmColors[1] = {SkPreMultiplyColor(SK_ColorWHITE)}; SkBitmap bm; - sk_sp<SkColorTable> ctable( new SkColorTable(pmColors, SK_ARRAY_COUNT(pmColors))); SkImageInfo info = SkImageInfo::Make(1, 1, kIndex_8_SkColorType, kPremul_SkAlphaType); - bm.allocPixels(info, nullptr, ctable.get()); - SkAutoLockPixels autoLockPixels(bm); + bm.allocPixels(info, SkColorTable::Make(pmColors, SK_ARRAY_COUNT(pmColors))); *bm.getAddr8(0, 0) = 0; sk_sp<SkImage> img(SkImage::MakeFromBitmap(bm)); REPORTER_ASSERT(r, img != nullptr); |