Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(392)

Unified Diff: skia/tools/filter_fuzz_stub/filter_fuzz_stub.cc

Issue 2472543002: remove legacy Skia flags (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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)));

Powered by Google App Engine
This is Rietveld 408576698