aboutsummaryrefslogtreecommitdiffhomepage
path: root/fuzz/fuzz.cpp
diff options
context:
space:
mode:
authorGravatar Leon Scroggins <scroggo@google.com>2016-11-11 18:44:37 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-11-11 18:44:49 +0000
commit857cb97a34ea1870b20ecbae6aa937a57243359c (patch)
treed4463c7074eeafa6600c85da06b4c576f4e9c792 /fuzz/fuzz.cpp
parent294870ff119b89fc902773643b054f14e5d1f554 (diff)
Revert "re-land of skslc now uses standard Skia caps"
This reverts commit 498d403f7703cb2157bf3c877b84906db5a06cd4. Reason for revert: Breaking compile bot: https://uberchromegw.corp.google.com/i/client.skia.compile/builders/Build-Ubuntu-GCC-x86_64-Release-NoGPU/builds/10116/steps/compile_skia%20on%20Ubuntu/logs/stdio undefined reference to `GrGLSLCaps::GrGLSLCaps(GrContextOptions const&) Original change's description: > re-land of skslc now uses standard Skia caps > > BUG=skia: > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4726 > > Change-Id: Ib1ea5d4269396e6c57ee1f0d7209aa9a9f2798e8 > Reviewed-on: https://skia-review.googlesource.com/4726 > Reviewed-by: Ethan Nicholas <ethannicholas@google.com> > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> > TBR=bsalomon@google.com,benjaminwagner@google.com,kjlubick@google.com,ethannicholas@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I7ee96d6c658be6b7b79027c147b8950c78c79a70 Reviewed-on: https://skia-review.googlesource.com/4729 Commit-Queue: Leon Scroggins <scroggo@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
Diffstat (limited to 'fuzz/fuzz.cpp')
-rw-r--r--fuzz/fuzz.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/fuzz/fuzz.cpp b/fuzz/fuzz.cpp
index d146a2f519..d6534f1aff 100644
--- a/fuzz/fuzz.cpp
+++ b/fuzz/fuzz.cpp
@@ -16,9 +16,7 @@
#include "SkPicture.h"
#include "SkPicture.h"
#include "SkPicture.h"
-#if SK_SUPPORT_GPU
#include "SkSLCompiler.h"
-#endif
#include "SkStream.h"
#include <signal.h>
@@ -40,9 +38,7 @@ static int fuzz_img(sk_sp<SkData>, uint8_t, uint8_t);
static int fuzz_skp(sk_sp<SkData>);
static int fuzz_icc(sk_sp<SkData>);
static int fuzz_color_deserialize(sk_sp<SkData>);
-#if SK_SUPPORT_GPU
static int fuzz_sksl2glsl(sk_sp<SkData>);
-#endif
int main(int argc, char** argv) {
SkCommandLineFlags::Parse(argc, argv);
@@ -75,11 +71,9 @@ int main(int argc, char** argv) {
if (0 == strcmp("skp", FLAGS_type[0])) {
return fuzz_skp(bytes);
}
-#if SK_SUPPORT_GPU
if (0 == strcmp("sksl2glsl", FLAGS_type[0])) {
return fuzz_sksl2glsl(bytes);
}
-#endif
}
return printUsage(argv[0]);
}
@@ -399,12 +393,11 @@ int fuzz_color_deserialize(sk_sp<SkData> bytes) {
return 0;
}
-#if SK_SUPPORT_GPU
int fuzz_sksl2glsl(sk_sp<SkData> bytes) {
SkSL::Compiler compiler;
std::string output;
bool result = compiler.toGLSL(SkSL::Program::kFragment_Kind,
- (const char*)bytes->data(), *SkSL::GLSLCapsFactory::Default(), &output);
+ (const char*)bytes->data(), SkSL::GLCaps(), &output);
if (!result) {
SkDebugf("[terminated] Couldn't compile input.\n");
@@ -413,7 +406,6 @@ int fuzz_sksl2glsl(sk_sp<SkData> bytes) {
SkDebugf("[terminated] Success! Compiled input.\n");
return 0;
}
-#endif
Fuzz::Fuzz(sk_sp<SkData> bytes) : fBytes(bytes), fNextByte(0) {}