| Index: skia/tools/filter_fuzz_stub/filter_fuzz_stub.cc
|
| diff --git a/skia/tools/filter_fuzz_stub/filter_fuzz_stub.cc b/skia/tools/filter_fuzz_stub/filter_fuzz_stub.cc
|
| index b96d9d3adc2677e58a1b7a292c115aa43355528b..f9d329ac4ba60d0b6350569e3fca01540f338945 100644
|
| --- a/skia/tools/filter_fuzz_stub/filter_fuzz_stub.cc
|
| +++ b/skia/tools/filter_fuzz_stub/filter_fuzz_stub.cc
|
| @@ -28,16 +28,15 @@ void RunTestCase(std::string& ipc_filter_message, SkBitmap& bitmap,
|
| SkCanvas* canvas) {
|
| // This call shouldn't crash or cause ASAN to flag any memory issues
|
| // If nothing bad happens within this call, everything is fine
|
| - SkFlattenable* flattenable = SkValidatingDeserializeFlattenable(
|
| - ipc_filter_message.c_str(), ipc_filter_message.size(),
|
| - SkImageFilter::GetFlattenableType());
|
| + sk_sp<SkImageFilter> flattenable = SkValidatingDeserializeImageFilter(
|
| + ipc_filter_message.c_str(), ipc_filter_message.size());
|
|
|
| // Adding some info, but the test passed if we got here without any trouble
|
| if (flattenable != NULL) {
|
| LOG(INFO) << "Valid stream detected.";
|
| // Let's see if using the filters can cause any trouble...
|
| SkPaint paint;
|
| - paint.setImageFilter(static_cast<SkImageFilter*>(flattenable))->unref();
|
| + paint.setImageFilter(flattenable);
|
| canvas->save();
|
| canvas->clipRect(SkRect::MakeXYWH(
|
| 0, 0, SkIntToScalar(BitmapSize), SkIntToScalar(BitmapSize)));
|
|
|