aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/chrome_fuzz.cpp
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2016-11-01 11:22:05 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-11-01 16:05:41 +0000
commit5e25717ab6313b011ec54eac0109c414aa8ffc17 (patch)
treeaa8f4f1fc4c68a3b77e671c61393206dd61f5b5f /tools/chrome_fuzz.cpp
parentc633abbb342e3af0e56382e8cb7e7d9fed71e237 (diff)
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>
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)));