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

Unified Diff: dm/DMWriteTask.cpp

Issue 270543004: DM: Add --skps. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: reed Created 6 years, 7 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 | « dm/DMWriteTask.h ('k') | gyp/dm.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMWriteTask.cpp
diff --git a/dm/DMWriteTask.cpp b/dm/DMWriteTask.cpp
index f7fa014ea45880a78ab9dd66d43b80ccc8750a4b..cfac4152e384e8b961743829bc2af1890aeb6cd2 100644
--- a/dm/DMWriteTask.cpp
+++ b/dm/DMWriteTask.cpp
@@ -26,11 +26,16 @@ static int split_suffixes(int N, const char* name, SkTArray<SkString>* out) {
return consumed;
}
-WriteTask::WriteTask(const Task& parent, SkBitmap bitmap) : CpuTask(parent), fBitmap(bitmap) {
- const int suffixes = parent.depth() + 1;
- const SkString& name = parent.name();
- const int totalSuffixLength = split_suffixes(suffixes, name.c_str(), &fSuffixes);
- fGmName.set(name.c_str(), name.size()-totalSuffixLength);
+WriteTask::WriteTask(const Task& parent, SkBitmap bitmap, Mode mode)
+ : CpuTask(parent), fBitmap(bitmap) {
+ if (mode == kVerbatim_Mode) {
+ fGmName.set(parent.name());
+ } else {
+ const int suffixes = parent.depth() + 1;
+ const SkString& name = parent.name();
+ const int totalSuffixLength = split_suffixes(suffixes, name.c_str(), &fSuffixes);
+ fGmName.set(name.c_str(), name.size()-totalSuffixLength);
+ }
}
void WriteTask::makeDirOrFail(SkString dir) {
« no previous file with comments | « dm/DMWriteTask.h ('k') | gyp/dm.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698