diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-05-16 13:15:41 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-05-16 13:15:41 +0000 |
commit | 61744ec1d2b0e287a652a419dac285c6a803e270 (patch) | |
tree | acc84ed655a85ad418a877fccfb2807add466c00 /bench | |
parent | 69031a44273ccb7656df88c6bcb7b62f4d2731bb (diff) |
Generate bench/Android.mk from gyp.
For now, remove json functionality and do not depend on json. This
allows us to build and run until solving skbug.com/2448.
bench/DeferredSurfaceCopyBench.cpp:
Include GrRenderTarget last, so SK_SUPPORT_GPU will be set properly.
bench/ResultsWriter.h:
bench/benchmain.cpp:
Remove JSONResultsWriter when SK_BUILD_JSON_WRITER is not defined,
which is the case for the Android framework build.
gyp/bench.gyp:
Depend on skia and cutils (for android_atomic_inc etc).
gyp/common_conditions.gypi:
Define SK_BUILD_JSON_WRITER when skia_build_json_writer is set.
gyp/common_variables.gypi:
Add a flag for skia_build_json_writer, and set it only when
skia_android_framework is not set.
gyp/jsoncpp.gyp:
Do not build jsoncpp when skia_build_json_writer is not defined.
include/utils/SkJSONCPP.h:
Do not include json headers when SK_BUILD_JSON_WRITER is not defined.
platform_tools/android/bin/gyp_to_android.py:
Generate bench/Android.mk.
platform_tools/android/gyp_gen/gypd_parser.py:
Skip dest_dir when checking for include_dirs.
platform_tools/android/gyp_gen/makefile_writer.py:
Build bench/Android.mk when building external/skia.
platform_tools/android/gyp_gen/tool_makefile_writer.py:
Add a parameter for putting the binary into /data/local/tmp.
BUG=skia:2447
BUG=skia:2448
R=halcanary@google.com, reed@google.com
Author: scroggo@google.com
Review URL: https://codereview.chromium.org/282053002
git-svn-id: http://skia.googlecode.com/svn/trunk@14760 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'bench')
-rw-r--r-- | bench/DeferredSurfaceCopyBench.cpp | 6 | ||||
-rw-r--r-- | bench/ResultsWriter.h | 2 | ||||
-rw-r--r-- | bench/benchmain.cpp | 7 |
3 files changed, 11 insertions, 4 deletions
diff --git a/bench/DeferredSurfaceCopyBench.cpp b/bench/DeferredSurfaceCopyBench.cpp index fcc19d4c39..6449b611bd 100644 --- a/bench/DeferredSurfaceCopyBench.cpp +++ b/bench/DeferredSurfaceCopyBench.cpp @@ -6,14 +6,14 @@ * found in the LICENSE file. */ -#if SK_SUPPORT_GPU -#include "GrRenderTarget.h" -#endif #include "SkBenchmark.h" #include "SkDeferredCanvas.h" #include "SkDevice.h" #include "SkImage.h" #include "SkSurface.h" +#if SK_SUPPORT_GPU +#include "GrRenderTarget.h" +#endif class DeferredSurfaceCopyBench : public SkBenchmark { enum { diff --git a/bench/ResultsWriter.h b/bench/ResultsWriter.h index 29d3d1df41..12c968a507 100644 --- a/bench/ResultsWriter.h +++ b/bench/ResultsWriter.h @@ -77,6 +77,7 @@ private: const char* fTimeFormat; }; +#ifdef SK_BUILD_JSON_WRITER /** * This ResultsWriter handles writing out the results in JSON. * @@ -133,6 +134,7 @@ private: Json::Value* fConfig; }; +#endif // SK_BUILD_JSON_WRITER /** * This ResultsWriter writes out to multiple ResultsWriters. */ diff --git a/bench/benchmain.cpp b/bench/benchmain.cpp index e2cc9c160f..25c552c5e0 100644 --- a/bench/benchmain.cpp +++ b/bench/benchmain.cpp @@ -267,8 +267,9 @@ 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, @@ -301,11 +302,15 @@ int tool_main(int argc, char** argv) { LoggerResultsWriter logWriter(logger, FLAGS_timeFormat[0]); 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. CallEnd<MultiResultsWriter> ender(writer); |