aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/ImageTest.cpp
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-04-01 12:14:57 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-01 16:46:11 +0000
commit9920b10f5292838f00600f676c4578cd11705e60 (patch)
tree9217d23bf701b4ccfd15d818bfea44b766ad4fc3 /tests/ImageTest.cpp
parentec61785bbb989a1901b063923da30c04ed41332f (diff)
Revert[2] "clean up (partially) colortable api""
This reverts commit 1d1165ca6575e082b892c5460492c411618783ad. Bug: skia: Change-Id: Idbc0634ae3cec2e79f592d252de8751b077e6408 Reviewed-on: https://skia-review.googlesource.com/11024 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'tests/ImageTest.cpp')
-rw-r--r--tests/ImageTest.cpp4
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);