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

Side by Side Diff: tools/picture_utils.h

Issue 327403002: Cleanup: Delete sk_tools::make_filepath() in favor of SkOSPath::SkPathJoin(). (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fixes 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 unified diff | Download patch
« no previous file with comments | « tools/lua/lua_pictures.cpp ('k') | tools/picture_utils.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 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef picture_utils_DEFINED 8 #ifndef picture_utils_DEFINED
9 #define picture_utils_DEFINED 9 #define picture_utils_DEFINED
10 10
(...skipping 15 matching lines...) Expand all
26 26
27 /** 27 /**
28 * Replaces all instances of oldChar with newChar in str. 28 * Replaces all instances of oldChar with newChar in str.
29 * 29 *
30 * TODO: This function appears here and in skimage_main.cpp ; 30 * TODO: This function appears here and in skimage_main.cpp ;
31 * we should add the implementation to src/core/SkString.cpp, write tests fo r it, 31 * we should add the implementation to src/core/SkString.cpp, write tests fo r it,
32 * and remove it from elsewhere. 32 * and remove it from elsewhere.
33 */ 33 */
34 void replace_char(SkString* str, const char oldChar, const char newChar); 34 void replace_char(SkString* str, const char oldChar, const char newChar);
35 35
36 // Creates a posix style filepath by concatenating name onto dir with a
37 // forward slash into path.
38 // TODO(epoger): delete in favor of SkOSPath::SkPathJoin()?
39 void make_filepath(SkString* path, const SkString&, const SkString& name);
40
41 // Returns true if the string ends with % 36 // Returns true if the string ends with %
42 bool is_percentage(const char* const string); 37 bool is_percentage(const char* const string);
43 38
44 // Prepares the bitmap so that it can be written. 39 // Prepares the bitmap so that it can be written.
45 // 40 //
46 // Specifically, it configures the bitmap, allocates pixels and then 41 // Specifically, it configures the bitmap, allocates pixels and then
47 // erases the pixels to transparent black. 42 // erases the pixels to transparent black.
48 void setup_bitmap(SkBitmap* bitmap, int width, int height); 43 void setup_bitmap(SkBitmap* bitmap, int width, int height);
49 44
50 /** 45 /**
51 * Write a bitmap file to disk. 46 * Write a bitmap file to disk.
52 * 47 *
53 * @param bm the bitmap to record 48 * @param bm the bitmap to record
54 * @param dirPath directory within which to write the image file 49 * @param dirPath directory within which to write the image file
55 * @param subdirOrNull subdirectory within dirPath, or NULL to just write in to dirPath 50 * @param subdirOrNull subdirectory within dirPath, or NULL to just write in to dirPath
56 * @param baseName last part of the filename 51 * @param baseName last part of the filename
57 * 52 *
58 * @return true if written out successfully 53 * @return true if written out successfully
59 */ 54 */
60 bool write_bitmap_to_disk(const SkBitmap& bm, const SkString& dirPath, 55 bool write_bitmap_to_disk(const SkBitmap& bm, const SkString& dirPath,
61 const char *subdirOrNull, const SkString& baseName ); 56 const char *subdirOrNull, const SkString& baseName );
62 57
63 } // namespace sk_tools 58 } // namespace sk_tools
64 59
65 #endif // picture_utils_DEFINED 60 #endif // picture_utils_DEFINED
OLDNEW
« no previous file with comments | « tools/lua/lua_pictures.cpp ('k') | tools/picture_utils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698