diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-05-16 17:56:43 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-05-16 17:56:43 +0000 |
commit | 25c1066e4d23cf7cb1795c78987f4fde08282b46 (patch) | |
tree | 45da3191440170d80460ad42ef2572cdaddf0725 /gm/gm_expectations.h | |
parent | a783559c26f8d8554be1fc50877da02e86301c2e (diff) |
Generate gm/Android.mk, minus JSON.
When running gyp_to_android.py, generate the makefile for gm.
For now, remove json functionality and do not depend on json. This
allows us to build and run until solving skbug.com/2448.
gm/gm_expectations.cpp:
gm/gm_expectations.h:
gm/gmmain.cpp:
Remove all json functionality when SK_BUILD_JSON_WRITER is not defined.
This flag is not defined when SK_BUILD_FOR_ANDROID is defined.
gyp/gm.gyp:
Depend on skia and cutils.
platform_tools/android/bin/gyp_to_android.py:
Generate gm/Android.mk.
platform_tools/android/gyp_gen/makefile_writer.py:
Build gm/Android.mk when building external/skia.
Depends on https://codereview.chromium.org/282053002/
BUG=skia:2447
BUG=skia:2448
R=epoger@google.com
Author: scroggo@google.com
Review URL: https://codereview.chromium.org/281303003
git-svn-id: http://skia.googlecode.com/svn/trunk@14767 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gm/gm_expectations.h')
-rw-r--r-- | gm/gm_expectations.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/gm/gm_expectations.h b/gm/gm_expectations.h index 7092127338..8d986f0847 100644 --- a/gm/gm_expectations.h +++ b/gm/gm_expectations.h @@ -22,12 +22,13 @@ namespace skiagm { +#ifdef SK_BUILD_JSON_WRITER Json::Value CreateJsonTree(Json::Value expectedResults, Json::Value actualResultsFailed, Json::Value actualResultsFailureIgnored, Json::Value actualResultsNoComparison, Json::Value actualResultsSucceeded); - +#endif /** * The digest of a GM test result. * @@ -41,12 +42,14 @@ namespace skiagm { */ explicit GmResultDigest(const SkBitmap &bitmap); +#ifdef SK_BUILD_JSON_WRITER /** * Create a ResultDigest representing an allowed result * checksum within JSON expectations file, in the form * ["bitmap-64bitMD5", 12345]. */ explicit GmResultDigest(const Json::Value &jsonTypeValuePair); +#endif /** * Returns true if this GmResultDigest was fully and successfully @@ -60,11 +63,13 @@ namespace skiagm { */ bool equals(const GmResultDigest &other) const; +#ifdef SK_BUILD_JSON_WRITER /** * Returns a JSON type/value pair representing this result, * such as ["bitmap-64bitMD5", 12345]. */ Json::Value asJsonTypeValuePair() const; +#endif /** * Returns the hashtype, such as "bitmap-64bitMD5", as an SkString. @@ -113,6 +118,7 @@ namespace skiagm { */ explicit Expectations(const BitmapAndDigest& bitmapAndDigest); +#ifdef SK_BUILD_JSON_WRITER /** * Create Expectations from a JSON element as found within the * kJsonKey_ExpectedResults section. @@ -121,6 +127,7 @@ namespace skiagm { * don't have any expectations. */ explicit Expectations(Json::Value jsonElement); +#endif /** * Returns true iff we want to ignore failed expectations. @@ -154,10 +161,12 @@ namespace skiagm { return (SkBitmap::kNo_Config == fBitmap.config()) ? NULL : &fBitmap; } +#ifdef SK_BUILD_JSON_WRITER /** * Return a JSON representation of the expectations. */ Json::Value asJsonValue() const; +#endif private: const static bool kDefaultIgnoreFailure = false; @@ -200,6 +209,7 @@ namespace skiagm { const SkString fRootDir; }; +#ifdef SK_BUILD_JSON_WRITER /** * Return Expectations based on JSON summary file. */ @@ -227,6 +237,7 @@ namespace skiagm { Json::Value fJsonRoot; Json::Value fJsonExpectedResults; }; +#endif // SK_BUILD_JSON_WRITER } #endif |