From 05b7bef01d42c727f5b2b065da7acc1ba75f1d3e Mon Sep 17 00:00:00 2001 From: "edisonn@google.com" Date: Fri, 19 Jul 2013 17:47:39 +0000 Subject: [PATCH] revert unreviewed 10194, will send to review Review URL: https://codereview.chromium.org/19693010 git-svn-id: http://skia.googlecode.com/svn/trunk@10196 2bbb7eff-a529-9590-31e7-b0007b416f81 --- experimental/skpdiff/SkDiffContext.cpp | 38 ---------------------------------- experimental/skpdiff/main.cpp | 8 ------- 2 files changed, 46 deletions(-) diff --git a/experimental/skpdiff/SkDiffContext.cpp b/experimental/skpdiff/SkDiffContext.cpp index bfe8604..b599127 100644 --- a/experimental/skpdiff/SkDiffContext.cpp +++ b/experimental/skpdiff/SkDiffContext.cpp @@ -6,7 +6,6 @@ */ #include "SkBitmap.h" -#include "SkCommandLineFlags.h" #include "SkImageDecoder.h" #include "SkOSFile.h" #include "SkStream.h" @@ -15,8 +14,6 @@ #include "SkImageDiffer.h" #include "skpdiff_util.h" -DECLARE_string(csv); - SkDiffContext::SkDiffContext() { fRecords = NULL; fDiffers = NULL; @@ -71,28 +68,6 @@ void SkDiffContext::addDiff(const char* baselinePath, const char* testPath) { newRecord->fNext = fRecords; fRecords = newRecord; - FILE* csvFile = NULL; - if (!FLAGS_csv.isEmpty()) { - csvFile = fopen(FLAGS_csv[0], "a"); - SkASSERT(csvFile); - if (ftell(csvFile) == 0) { - fprintf(csvFile, "%s", "skp"); - for (int differIndex = 0; differIndex < fDifferCount; differIndex++) { - SkImageDiffer* differ = fDiffers[differIndex]; - fprintf(csvFile, ", %s", differ->getName()); - } - fprintf(csvFile, "\n"); - } - } - - if (csvFile) { - const char* filename = baselinePath + strlen(baselinePath) - 1; - while (filename > baselinePath && *(filename - 1) != '/') { - filename--; - } - fprintf(csvFile, "%s", filename); - } - // Perform each diff for (int differIndex = 0; differIndex < fDifferCount; differIndex++) { SkImageDiffer* differ = fDiffers[differIndex]; @@ -105,10 +80,6 @@ void SkDiffContext::addDiff(const char* baselinePath, const char* testPath) { diffData.fDiffName = differ->getName(); diffData.fResult = differ->getResult(diffID); - if (csvFile) { - fprintf(csvFile, ", %f", diffData.fResult); - } - int poiCount = differ->getPointsOfInterestCount(diffID); SkIPoint* poi = differ->getPointsOfInterest(diffID); diffData.fPointsOfInterest.append(poiCount, poi); @@ -116,17 +87,8 @@ void SkDiffContext::addDiff(const char* baselinePath, const char* testPath) { // Because we are doing everything synchronously for now, we are done with the diff // after reading it. differ->deleteDiff(diffID); - } else { - if (csvFile) { - fprintf(csvFile, ", -1"); - } } } - - if (csvFile) { - fprintf(csvFile, "\n"); - fclose(csvFile); - } } diff --git a/experimental/skpdiff/main.cpp b/experimental/skpdiff/main.cpp index f546008..d258c14 100644 --- a/experimental/skpdiff/main.cpp +++ b/experimental/skpdiff/main.cpp @@ -32,7 +32,6 @@ DEFINE_string2(folders, f, "", "Compare two folders with identical subfile names DEFINE_string2(patterns, p, "", "Use two patterns to compare images: "); DEFINE_string2(output, o, "skpdiff_output.json", "Writes the output of these diffs to output: "); DEFINE_bool(jsonp, true, "Output JSON with padding"); -DEFINE_string(csv, "", "Writes the output of these diffs to a csv file"); #if SK_SUPPORT_OPENCL /// A callback for any OpenCL errors @@ -170,13 +169,6 @@ int main(int argc, char** argv) { } } - if (!FLAGS_csv.isEmpty()) { - if (1 != FLAGS_csv.count()) { - SkDebugf("csv flag expects one argument: \n"); - return 1; - } - } - SkDiffContext ctx; ctx.setDiffers(chosenDiffers); -- 2.7.4