aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/chrome_fuzz.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/chrome_fuzz.cpp')
-rw-r--r--tools/chrome_fuzz.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/chrome_fuzz.cpp b/tools/chrome_fuzz.cpp
index c59c741599..94479662b4 100644
--- a/tools/chrome_fuzz.cpp
+++ b/tools/chrome_fuzz.cpp
@@ -27,18 +27,18 @@ static bool read_test_case(const char* filename, SkString* testdata) {
}
static void run_test_case(const SkString& testdata, const SkBitmap& bitmap,
- SkCanvas* canvas) {
+ 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(
- testdata.c_str(), testdata.size(), SkImageFilter::GetFlattenableType());
+ sk_sp<SkImageFilter> flattenable = SkValidatingDeserializeImageFilter(testdata.c_str(),
+ testdata.size());
// Adding some info, but the test passed if we got here without any trouble
if (flattenable != nullptr) {
SkDebugf("Valid stream detected.\n");
// 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(kBitmapSize), SkIntToScalar(kBitmapSize)));