Index: tools/skpdiff/SkDiffContext.cpp |
diff --git a/tools/skpdiff/SkDiffContext.cpp b/tools/skpdiff/SkDiffContext.cpp |
index cf2654ac054ca395933e84d677f7f146b9cd5deb..07e2a0bb880ba688ec517ad4e6633c450a654d23 100644 |
--- a/tools/skpdiff/SkDiffContext.cpp |
+++ b/tools/skpdiff/SkDiffContext.cpp |
@@ -164,14 +164,20 @@ void SkDiffContext::outputRecords(SkWStream& stream, bool useJSONP) { |
while (NULL != currentRecord) { |
stream.writeText(" {\n"); |
+ char* baselineAbsPath = get_absolute_path(currentRecord->fBaselinePath.c_str()); |
+ char* testAbsPath = get_absolute_path(currentRecord->fTestPath.c_str()); |
+ |
stream.writeText(" \"baselinePath\": \""); |
- stream.writeText(currentRecord->fBaselinePath.c_str()); |
+ stream.writeText(baselineAbsPath); |
stream.writeText("\",\n"); |
stream.writeText(" \"testPath\": \""); |
- stream.writeText(currentRecord->fTestPath.c_str()); |
+ stream.writeText(testAbsPath); |
stream.writeText("\",\n"); |
+ free(baselineAbsPath); |
+ free(testAbsPath); |
+ |
stream.writeText(" \"diffs\": [\n"); |
for (int diffIndex = 0; diffIndex < currentRecord->fDiffs.count(); diffIndex++) { |
DiffData& data = currentRecord->fDiffs[diffIndex]; |