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

Side by Side Diff: dm/DMWriteTask.cpp

Issue 452633002: Fix iOS build by centralizing --writePath. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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 | « bench/nanobench.cpp ('k') | tools/flags/SkCommonFlags.h » ('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 "SkImageEncoder.h" 6 #include "SkImageEncoder.h"
7 #include "SkMallocPixelRef.h" 7 #include "SkMallocPixelRef.h"
8 #include "SkStream.h" 8 #include "SkStream.h"
9 #include "SkString.h" 9 #include "SkString.h"
10 10
11 DEFINE_string2(writePath, w, "", "If set, write GMs here as .pngs.");
12 DEFINE_bool(writePngOnly, false, "If true, don't encode raw bitmap after .png da ta. " 11 DEFINE_bool(writePngOnly, false, "If true, don't encode raw bitmap after .png da ta. "
13 "This means -r won't work, but skdiff will stil l work fine."); 12 "This means -r won't work, but skdiff will stil l work fine.");
14 13
15 namespace DM { 14 namespace DM {
16 15
17 // Splits off the last N suffixes of name (splitting on _) and appends them to o ut. 16 // Splits off the last N suffixes of name (splitting on _) and appends them to o ut.
18 // Returns the total number of characters consumed. 17 // Returns the total number of characters consumed.
19 static int split_suffixes(int N, const char* name, SkTArray<SkString>* out) { 18 static int split_suffixes(int N, const char* name, SkTArray<SkString>* out) {
20 SkTArray<SkString> split; 19 SkTArray<SkString> split;
21 SkStrSplit(name, "_", &split); 20 SkStrSplit(name, "_", &split);
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 const SkString path = path_to_expected_image(fRoot, task); 190 const SkString path = path_to_expected_image(fRoot, task);
192 SkBitmap expected; 191 SkBitmap expected;
193 if (!PngAndRaw::Decode(path.c_str(), bitmap.info(), &expected)) { 192 if (!PngAndRaw::Decode(path.c_str(), bitmap.info(), &expected)) {
194 return false; 193 return false;
195 } 194 }
196 195
197 return BitmapsEqual(expected, bitmap); 196 return BitmapsEqual(expected, bitmap);
198 } 197 }
199 198
200 } // namespace DM 199 } // namespace DM
OLDNEW
« no previous file with comments | « bench/nanobench.cpp ('k') | tools/flags/SkCommonFlags.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698