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

Side by Side Diff: dm/DMWriteTask.cpp

Issue 628763005: Fix usage of SK_BUILD_* defines. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/core/SkUtilsArm.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | src/core/SkUtilsArm.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698