diff options
author | estade <estade@chromium.org> | 2015-08-03 19:01:18 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-04 02:02:16 +0000 |
commit | 93906afd35bf9de7ed25b174d490716b730a6044 (patch) | |
tree | 70e4b8096298426dc00e954390abb3a5d0215f7a /ui/gfx/paint_vector_icon.h | |
parent | 3fbc851bdcfd2220056fa37fc91ae8b368ef4f75 (diff) | |
download | chromium_src-93906afd35bf9de7ed25b174d490716b730a6044.zip chromium_src-93906afd35bf9de7ed25b174d490716b730a6044.tar.gz chromium_src-93906afd35bf9de7ed25b174d490716b730a6044.tar.bz2 |
Make it easier to test changes to a .icon file.
No need to recompile Chrome; views_examples_exe will read from a file. This would also be useful for the tool which will allow designers to create .icon files directly (which may or may not ever materialize).
Since this is potentially unsafe (could crash on the wrong inputs) and doesn't serve a purpose in Chrome itself, it's ifdef'd out of the header everywhere except those places that explicitly need it.
BUG=505953
Review URL: https://codereview.chromium.org/1268633002
Cr-Commit-Position: refs/heads/master@{#341667}
Diffstat (limited to 'ui/gfx/paint_vector_icon.h')
-rw-r--r-- | ui/gfx/paint_vector_icon.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ui/gfx/paint_vector_icon.h b/ui/gfx/paint_vector_icon.h index 563d7cb..51b2440 100644 --- a/ui/gfx/paint_vector_icon.h +++ b/ui/gfx/paint_vector_icon.h @@ -28,6 +28,15 @@ GFX_EXPORT ImageSkia CreateVectorIcon(VectorIconId id, size_t dip_size, SkColor color); +#if defined(GFX_VECTOR_ICONS_UNSAFE) || defined(GFX_IMPLEMENTATION) +// Takes a string of the format expected of .icon files and renders onto +// a canvas. This should only be used as a debugging aid and should never be +// used in production code. +GFX_EXPORT ImageSkia CreateVectorIconFromSource(const std::string& source, + size_t dip_size, + SkColor color); +#endif + } // namespace gfx #endif // UI_GFX_PAINT_VECTOR_ICON_H_ |