From c092d3bdab5f723576cc0346cea3ee282a9cb444 Mon Sep 17 00:00:00 2001 From: kkinnunen Date: Thu, 13 Nov 2014 05:00:57 -0800 Subject: Make nanobench and dm be usable from Chromium build Move the app logic for each app as follows: .cpp -- the file which contains main(). Embedders that compile their own apps, such as ios shell, upcoming Chromium dm etc, do not use this. _main.cpp -- the main logic of the Skia test application. This will be used by Skia -compiled apps as well as embedder -compiled apps. _main.h -- the API for the main logic. This will be used by Skia -compiled apps as well as embedder -compiled apps. This way (the upcoming) Chromium dm can setup its Chromium-specific setup in custom main(), and then call dm_main(), without the need of any SK_BUILD_FOR_XXXX defines controlling whether the tool defines main or not. BUG=skia:2992 Review URL: https://codereview.chromium.org/657373002 --- bench/nanobench.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 bench/nanobench.h (limited to 'bench/nanobench.h') diff --git a/bench/nanobench.h b/bench/nanobench.h new file mode 100644 index 0000000000..4616747382 --- /dev/null +++ b/bench/nanobench.h @@ -0,0 +1,13 @@ +/* + * Copyright 2014 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ +#ifndef nanobench_DEFINED +#define nanobench_DEFINED + +// API for nanobench app. +int nanobench_main(); + +#endif -- cgit v1.2.3