Index: gm/gm_expectations.cpp |
diff --git a/gm/gm_expectations.cpp b/gm/gm_expectations.cpp |
index 28493ddd9e9c26f5fa5d5596c8da53432902d527..77e796e96148b1e7d05562ba56d13a813ffb2ba8 100644 |
--- a/gm/gm_expectations.cpp |
+++ b/gm/gm_expectations.cpp |
@@ -31,6 +31,9 @@ const static char kJsonKey_Hashtype_Bitmap_64bitMD5[] = "bitmap-64bitMD5"; |
namespace skiagm { |
+// FIXME (scroggo): JSON is disabled in Android framework until we solve |
+// skbug.com/2448 |
+#ifndef SK_BUILD_FOR_ANDROID_FRAMEWORK |
Json::Value CreateJsonTree(Json::Value expectedResults, |
Json::Value actualResultsFailed, |
Json::Value actualResultsFailureIgnored, |
@@ -46,7 +49,7 @@ namespace skiagm { |
root[kJsonKey_ExpectedResults] = expectedResults; |
return root; |
} |
- |
+#endif |
// GmResultDigest class... |
@@ -54,6 +57,9 @@ namespace skiagm { |
fIsValid = SkBitmapHasher::ComputeDigest(bitmap, &fHashDigest); |
} |
+// FIXME (scroggo): JSON is disabled in Android framework until we solve |
+// skbug.com/2448 |
+#ifndef SK_BUILD_FOR_ANDROID_FRAMEWORK |
GmResultDigest::GmResultDigest(const Json::Value &jsonTypeValuePair) { |
fIsValid = false; |
if (!jsonTypeValuePair.isArray()) { |
@@ -78,6 +84,7 @@ namespace skiagm { |
} |
} |
} |
+#endif |
bool GmResultDigest::isValid() const { |
return fIsValid; |
@@ -89,6 +96,9 @@ namespace skiagm { |
return (this->fIsValid && other.fIsValid && (this->fHashDigest == other.fHashDigest)); |
} |
+// FIXME (scroggo): JSON is disabled in Android framework until we solve |
+// skbug.com/2448 |
+#ifndef SK_BUILD_FOR_ANDROID_FRAMEWORK |
Json::Value GmResultDigest::asJsonTypeValuePair() const { |
// TODO(epoger): The current implementation assumes that the |
// result digest is always of type kJsonKey_Hashtype_Bitmap_64bitMD5 |
@@ -101,6 +111,7 @@ namespace skiagm { |
} |
return jsonTypeValuePair; |
} |
+#endif |
SkString GmResultDigest::getHashType() const { |
// TODO(epoger): The current implementation assumes that the |
@@ -135,6 +146,9 @@ namespace skiagm { |
fAllowedResultDigests.push_back(bitmapAndDigest.fDigest); |
} |
+// FIXME (scroggo): JSON is disabled in Android framework until we solve |
+// skbug.com/2448 |
+#ifndef SK_BUILD_FOR_ANDROID_FRAMEWORK |
Expectations::Expectations(Json::Value jsonElement) { |
if (jsonElement.empty()) { |
fIgnoreFailure = kDefaultIgnoreFailure; |
@@ -167,6 +181,7 @@ namespace skiagm { |
} |
} |
} |
+#endif |
bool Expectations::match(GmResultDigest actualGmResultDigest) const { |
for (int i=0; i < this->fAllowedResultDigests.count(); i++) { |
@@ -178,6 +193,9 @@ namespace skiagm { |
return false; |
} |
+// FIXME (scroggo): JSON is disabled in Android framework until we solve |
+// skbug.com/2448 |
+#ifndef SK_BUILD_FOR_ANDROID_FRAMEWORK |
Json::Value Expectations::asJsonValue() const { |
Json::Value allowedDigestArray; |
if (!this->fAllowedResultDigests.empty()) { |
@@ -191,7 +209,7 @@ namespace skiagm { |
jsonExpectations[kJsonKey_ExpectedResults_IgnoreFailure] = this->ignoreFailure(); |
return jsonExpectations; |
} |
- |
+#endif |
// IndividualImageExpectationsSource class... |
@@ -211,6 +229,9 @@ namespace skiagm { |
} |
+// FIXME (scroggo): JSON is disabled in Android framework until we solve |
+// skbug.com/2448 |
+#ifndef SK_BUILD_FOR_ANDROID_FRAMEWORK |
// JsonExpectationsSource class... |
JsonExpectationsSource::JsonExpectationsSource(const char *jsonPath) { |
@@ -240,5 +261,5 @@ namespace skiagm { |
} |
return true; |
} |
- |
+#endif |
} |