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

Unified Diff: dm/DMSKPTask.cpp

Issue 316643003: DM: SKP source / PDF backend (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: cast Created 6 years, 6 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/DMPDFTask.cpp ('k') | dm/DMUtil.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMSKPTask.cpp
diff --git a/dm/DMSKPTask.cpp b/dm/DMSKPTask.cpp
index 04c4184846e00fe1e84c5bb93c190c92a57785b5..760138f7c98a96d4b52ac5d5a424fcd6cdbfe3fc 100644
--- a/dm/DMSKPTask.cpp
+++ b/dm/DMSKPTask.cpp
@@ -5,17 +5,8 @@
namespace DM {
-// foo_bar.skp -> foo-bar_skp
-static SkString filename_to_task_name(SkString filename) {
- for (size_t i = 0; i < filename.size(); i++) {
- if ('_' == filename[i]) { filename[i] = '-'; }
- if ('.' == filename[i]) { filename[i] = '_'; }
- }
- return filename;
-}
-
SKPTask::SKPTask(Reporter* r, TaskRunner* tr, SkPicture* pic, SkString filename)
- : CpuTask(r, tr), fPicture(SkRef(pic)), fName(filename_to_task_name(filename)) {}
+ : CpuTask(r, tr), fPicture(SkRef(pic)), fName(FileToTaskName(filename)) {}
void SKPTask::draw() {
SkBitmap bitmap;
« no previous file with comments | « dm/DMPDFTask.cpp ('k') | dm/DMUtil.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698