Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Unified Diff: tools/skpdiff/SkDiffContext.cpp

Issue 21601002: fix skpdiff viewer bug when using relative paths (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: SkString mega efficiency patch Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/skpdiff/skpdiff_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/skpdiff/SkDiffContext.cpp
diff --git a/tools/skpdiff/SkDiffContext.cpp b/tools/skpdiff/SkDiffContext.cpp
index cf2654ac054ca395933e84d677f7f146b9cd5deb..f551ff350809c7fab0cb590c1c150ec304f5221c 100644
--- a/tools/skpdiff/SkDiffContext.cpp
+++ b/tools/skpdiff/SkDiffContext.cpp
@@ -164,12 +164,15 @@ void SkDiffContext::outputRecords(SkWStream& stream, bool useJSONP) {
while (NULL != currentRecord) {
stream.writeText(" {\n");
+ SkString baselineAbsPath = get_absolute_path(currentRecord->fBaselinePath);
+ SkString testAbsPath = get_absolute_path(currentRecord->fTestPath);
+
stream.writeText(" \"baselinePath\": \"");
- stream.writeText(currentRecord->fBaselinePath.c_str());
+ stream.writeText(baselineAbsPath.c_str());
stream.writeText("\",\n");
stream.writeText(" \"testPath\": \"");
- stream.writeText(currentRecord->fTestPath.c_str());
+ stream.writeText(testAbsPath.c_str());
stream.writeText("\",\n");
stream.writeText(" \"diffs\": [\n");
« no previous file with comments | « no previous file | tools/skpdiff/skpdiff_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698