aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/ImageTest.cpp
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-04-03 14:41:44 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-03 19:29:38 +0000
commit6b3155c4be0476bc53541b0431c368a44e69f0a7 (patch)
tree2de5a87716b38a587c475731df815e5c8178e133 /tests/ImageTest.cpp
parent2db3232c88cbaec5585f263111f334ca7272fe10 (diff)
Revert[4] "clean up (partially) colortable api""""
Fixes: - create temp api for android to pass nullptr - don't release and access sk_sp<SkData> at the same time in parameters This reverts commit b14131c1851eea6acbd34cc42a8f860daed36b21. Bug: skia: Change-Id: Ic0e4f62520ba9f35455499ed30d306ad19d998a8 Reviewed-on: https://skia-review.googlesource.com/11129 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.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/ImageTest.cpp b/tests/ImageTest.cpp
index 3a7a192839..9916ed3e08 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);