aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench
diff options
context:
space:
mode:
authorGravatar scroggo <scroggo@google.com>2014-06-18 10:31:40 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-06-18 10:31:40 -0700
commitf01a6c3663970ccd6e1882e76a887e0fda467b77 (patch)
tree849e0d79d4188528cf17849bb9535a452c05dfde /bench
parentb59161f0000eb4aca3dcef29f27ffd0fb5a568e5 (diff)
In Android framework, make tools depend on jsoncpp
Always build the tools with JSON, but either build our own or use the system's. Rename skia_build_json_writer to skia_use_system_jsoncpp, since we now always build with JSON. Remove SK_BUILD_JSON_WRITER, which was only there so we could build without JSON it in the framework. BUG=skia:2448 R=djsollen@google.com, reed@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/303913002
Diffstat (limited to 'bench')
-rw-r--r--bench/ResultsWriter.cpp3
-rw-r--r--bench/ResultsWriter.h3
-rw-r--r--bench/TimerData.cpp2
-rw-r--r--bench/TimerData.h2
-rw-r--r--bench/benchmain.cpp4
5 files changed, 0 insertions, 14 deletions
diff --git a/bench/ResultsWriter.cpp b/bench/ResultsWriter.cpp
index 0bfcba8b1e..08f11c190f 100644
--- a/bench/ResultsWriter.cpp
+++ b/bench/ResultsWriter.cpp
@@ -9,8 +9,6 @@
#include "ResultsWriter.h"
-#ifdef SK_BUILD_JSON_WRITER
-
Json::Value* SkFindNamedNode(Json::Value* root, const char name[]) {
Json::Value* search_results = NULL;
for(Json::Value::iterator iter = root->begin();
@@ -30,4 +28,3 @@ Json::Value* SkFindNamedNode(Json::Value* root, const char name[]) {
}
}
-#endif // SK_BUILD_JSON_WRITER
diff --git a/bench/ResultsWriter.h b/bench/ResultsWriter.h
index c66593864f..e089d7fd07 100644
--- a/bench/ResultsWriter.h
+++ b/bench/ResultsWriter.h
@@ -77,7 +77,6 @@ private:
const char* fTimeFormat;
};
-#ifdef SK_BUILD_JSON_WRITER
/**
* This ResultsWriter handles writing out the results in JSON.
*
@@ -146,8 +145,6 @@ private:
Json::Value* fConfig;
};
-#endif // SK_BUILD_JSON_WRITER
-
/**
* This ResultsWriter writes out to multiple ResultsWriters.
*/
diff --git a/bench/TimerData.cpp b/bench/TimerData.cpp
index d3dbf28524..0cb000280b 100644
--- a/bench/TimerData.cpp
+++ b/bench/TimerData.cpp
@@ -140,7 +140,6 @@ SkString TimerData::getResult(const char* doubleFormat,
return str;
}
-#ifdef SK_BUILD_JSON_WRITER
Json::Value TimerData::getJSON(uint32_t timerFlags,
Result result,
int itersPerTiming) {
@@ -223,4 +222,3 @@ Json::Value TimerData::getJSON(uint32_t timerFlags,
}
return dataNode;
}
-#endif // SK_BUILD_JSON_WRITER
diff --git a/bench/TimerData.h b/bench/TimerData.h
index be6158bbd8..fb84df1a9e 100644
--- a/bench/TimerData.h
+++ b/bench/TimerData.h
@@ -68,11 +68,9 @@ public:
const char* configName,
uint32_t timerFlags,
int itersPerTiming = 1);
-#ifdef SK_BUILD_JSON_WRITER
Json::Value getJSON(uint32_t timerFlags,
Result result,
int itersPerTiming = 1);
-#endif // SK_BUILD_JSON_WRITER
private:
int fMaxNumTimings;
diff --git a/bench/benchmain.cpp b/bench/benchmain.cpp
index af70878282..6e18a8ab3a 100644
--- a/bench/benchmain.cpp
+++ b/bench/benchmain.cpp
@@ -255,9 +255,7 @@ DEFINE_double(error, 0.01,
DEFINE_string(timeFormat, "%9.2f", "Format to print results, in milliseconds per 1000 loops.");
DEFINE_bool2(verbose, v, false, "Print more.");
DEFINE_string2(resourcePath, i, "resources", "directory for test resources.");
-#ifdef SK_BUILD_JSON_WRITER
DEFINE_string(outResultsFile, "", "If given, the results will be written to the file in JSON format.");
-#endif
DEFINE_bool(dryRun, false, "Don't actually run the tests, just print what would have been done.");
// Has this bench converged? First arguments are milliseconds / loop iteration,
@@ -291,13 +289,11 @@ int tool_main(int argc, char** argv) {
MultiResultsWriter writer;
writer.add(&logWriter);
-#ifdef SK_BUILD_JSON_WRITER
SkAutoTDelete<JSONResultsWriter> jsonWriter;
if (FLAGS_outResultsFile.count()) {
jsonWriter.reset(SkNEW(JSONResultsWriter(FLAGS_outResultsFile[0])));
writer.add(jsonWriter.get());
}
-#endif
// Instantiate after all the writers have been added to writer so that we
// call close() before their destructors are called on the way out.