| OLD | NEW | 
|---|
| 1 #include "DMWriteTask.h" | 1 #include "DMWriteTask.h" | 
| 2 | 2 | 
| 3 #include "DMUtil.h" | 3 #include "DMUtil.h" | 
| 4 #include "SkColorPriv.h" | 4 #include "SkColorPriv.h" | 
| 5 #include "SkCommonFlags.h" | 5 #include "SkCommonFlags.h" | 
| 6 #include "SkData.h" | 6 #include "SkData.h" | 
| 7 #include "SkImageEncoder.h" | 7 #include "SkImageEncoder.h" | 
| 8 #include "SkMD5.h" | 8 #include "SkMD5.h" | 
| 9 #include "SkMallocPixelRef.h" | 9 #include "SkMallocPixelRef.h" | 
| 10 #include "SkOSFile.h" | 10 #include "SkOSFile.h" | 
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 112         mode = fSuffixes.fromBack(1); | 112         mode = fSuffixes.fromBack(1); | 
| 113     } | 113     } | 
| 114 | 114 | 
| 115     JsonData entry = { fBaseName, config, mode, fSourceType, md5 }; | 115     JsonData entry = { fBaseName, config, mode, fSourceType, md5 }; | 
| 116     { | 116     { | 
| 117         SkAutoMutexAcquire lock(&gJsonDataLock); | 117         SkAutoMutexAcquire lock(&gJsonDataLock); | 
| 118         gJsonData.push_back(entry); | 118         gJsonData.push_back(entry); | 
| 119     } | 119     } | 
| 120 | 120 | 
| 121     SkString dir(FLAGS_writePath[0]); | 121     SkString dir(FLAGS_writePath[0]); | 
| 122 #if SK_BUILD_FOR_IOS | 122 #if defined(SK_BUILD_FOR_IOS) | 
| 123     if (dir.equals("@")) { | 123     if (dir.equals("@")) { | 
| 124         dir.set(FLAGS_resourcePath[0]); | 124         dir.set(FLAGS_resourcePath[0]); | 
| 125     } | 125     } | 
| 126 #endif | 126 #endif | 
| 127     this->makeDirOrFail(dir); | 127     this->makeDirOrFail(dir); | 
| 128 | 128 | 
| 129     SkString path; | 129     SkString path; | 
| 130     if (FLAGS_nameByHash) { | 130     if (FLAGS_nameByHash) { | 
| 131         // Flat directory of hash-named files. | 131         // Flat directory of hash-named files. | 
| 132         path = SkOSPath::Join(dir.c_str(), md5.c_str()); | 132         path = SkOSPath::Join(dir.c_str(), md5.c_str()); | 
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 202         } | 202         } | 
| 203     } | 203     } | 
| 204 | 204 | 
| 205     SkString path = SkOSPath::Join(FLAGS_writePath[0], "dm.json"); | 205     SkString path = SkOSPath::Join(FLAGS_writePath[0], "dm.json"); | 
| 206     SkFILEWStream stream(path.c_str()); | 206     SkFILEWStream stream(path.c_str()); | 
| 207     stream.writeText(Json::StyledWriter().write(root).c_str()); | 207     stream.writeText(Json::StyledWriter().write(root).c_str()); | 
| 208     stream.flush(); | 208     stream.flush(); | 
| 209 } | 209 } | 
| 210 | 210 | 
| 211 }  // namespace DM | 211 }  // namespace DM | 
| OLD | NEW | 
|---|