The current use case for this is whitelisting MergeImageFilter failures when the number of inputs is too big. Presumably there will be other whitelisting use cases as we progress.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1873463002
Review URL: https://codereview.chromium.org/
1873463002
'<(skia_src_path)/core/SkFontDescriptor.h',
'<(skia_src_path)/core/SkFontStream.cpp',
'<(skia_src_path)/core/SkFontStream.h',
+ '<(skia_src_path)/core/SkFuzzLogging.h',
'<(skia_src_path)/core/SkGeometry.cpp',
'<(skia_src_path)/core/SkGeometry.h',
'<(skia_src_path)/core/SkGlobalInitialization_core.cpp',
--- /dev/null
+/*
+ * Copyright 2016 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef SkFuzzLogging_DEFINED
+#define SkFuzzLogging_DEFINED
+
+// Utilities for Skia's fuzzer
+
+// When SK_FUZZ_LOGGING is defined SkDebugfs relevant to image filter fuzzing
+// will be enabled. This allows the filter fuzzing code to white list fuzzer
+// failures based on the output logs.
+// Define this flag in your SkUserConfig.h or in your Make/Build system.
+#ifdef SK_FUZZ_LOGGING
+ #define SkFUZZF(args) SkDebugf("SkFUZZ: "); SkDebugf args
+#else
+ #define SkFUZZF(args)
+#endif
+
+#endif
#include "SkBitmapDevice.h"
#include "SkChecksum.h"
#include "SkDevice.h"
+#include "SkFuzzLogging.h"
#include "SkLocalMatrixImageFilter.h"
#include "SkMatrixImageFilter.h"
#include "SkOncePtr.h"
return false;
}
+ SkFUZZF(("allocInputs: %d\n", count));
this->allocInputs(count);
for (int i = 0; i < count; i++) {
if (buffer.readBool()) {