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

Unified Diff: dm/DMSrcSink.cpp

Issue 863723002: image subsetting as part of the name instead of a separate source type (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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/DM.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMSrcSink.cpp
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
index cf72a3cacaf7bc9ff3250915152f3d5ac9df4101..64b2ec30a8a0b3fa18e750d2982cd0d1889fd04c 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -89,7 +89,13 @@ SkISize ImageSrc::size() const {
return bitmap.dimensions();
}
-Name ImageSrc::name() const { return SkOSPath::Basename(fPath.c_str()); }
+Name ImageSrc::name() const {
+ Name name = SkOSPath::Basename(fPath.c_str());
+ if (fSubsets > 0) {
+ name.appendf("-%d-subsets", fSubsets);
+ }
+ return name;
+}
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
« no previous file with comments | « dm/DM.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698