hide setImageFilter(ptr)
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4184
Change-Id: Iad792cfdf54087ad4c424fd268559c162a9a5f5c
Reviewed-on: https://skia-review.googlesource.com/4184
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
diff --git a/tests/ImageFilterTest.cpp b/tests/ImageFilterTest.cpp
index 42ffd38..a6961ff 100644
--- a/tests/ImageFilterTest.cpp
+++ b/tests/ImageFilterTest.cpp
@@ -731,7 +731,7 @@
tiledCanvas.clear(0);
untiledCanvas.clear(0);
SkPaint paint;
- paint.setImageFilter(filters.getFilter(i));
+ paint.setImageFilter(sk_ref_sp(filters.getFilter(i)));
paint.setTextSize(SkIntToScalar(height));
paint.setColor(SK_ColorWHITE);
SkString str;
@@ -1231,9 +1231,8 @@
// deserialize its contained picture when the filter is serialized
// cross-process. Do this by "laundering" it through SkValidatingReadBuffer.
sk_sp<SkData> data(SkValidatingSerializeFlattenable(imageFilter.get()));
- sk_sp<SkFlattenable> flattenable(SkValidatingDeserializeFlattenable(
- data->data(), data->size(), SkImageFilter::GetFlattenableType()));
- SkImageFilter* unflattenedFilter = static_cast<SkImageFilter*>(flattenable.get());
+ sk_sp<SkImageFilter> unflattenedFilter = SkValidatingDeserializeImageFilter(data->data(),
+ data->size());
redPaintWithFilter.setImageFilter(unflattenedFilter);
SkPictureRecorder crossProcessRecorder;
@@ -1686,9 +1685,8 @@
sk_sp<SkImageFilter> filter(SkImageSource::Make(std::move(image)));
sk_sp<SkData> data(SkValidatingSerializeFlattenable(filter.get()));
- sk_sp<SkFlattenable> flattenable(SkValidatingDeserializeFlattenable(
- data->data(), data->size(), SkImageFilter::GetFlattenableType()));
- SkImageFilter* unflattenedFilter = static_cast<SkImageFilter*>(flattenable.get());
+ sk_sp<SkImageFilter> unflattenedFilter = SkValidatingDeserializeImageFilter(data->data(),
+ data->size());
REPORTER_ASSERT(reporter, unflattenedFilter);
SkBitmap bm;