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

Side by Side Diff: ui/gfx/paint_vector_icon.h

Issue 1313603003: Vectorize website settings icons in omnibox (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change DCHECK Created 5 years, 3 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 | « ui/gfx/BUILD.gn ('k') | ui/gfx/paint_vector_icon.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_GFX_PAINT_VECTOR_ICON_H_ 5 #ifndef UI_GFX_PAINT_VECTOR_ICON_H_
6 #define UI_GFX_PAINT_VECTOR_ICON_H_ 6 #define UI_GFX_PAINT_VECTOR_ICON_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "third_party/skia/include/core/SkColor.h" 9 #include "third_party/skia/include/core/SkColor.h"
10 #include "ui/gfx/gfx_export.h" 10 #include "ui/gfx/gfx_export.h"
(...skipping 10 matching lines...) Expand all
21 GFX_EXPORT void PaintVectorIcon(Canvas* canvas, 21 GFX_EXPORT void PaintVectorIcon(Canvas* canvas,
22 VectorIconId id, 22 VectorIconId id,
23 size_t dip_size, 23 size_t dip_size,
24 SkColor color); 24 SkColor color);
25 25
26 // Creates an ImageSkia which will render the icon on demand. 26 // Creates an ImageSkia which will render the icon on demand.
27 GFX_EXPORT ImageSkia CreateVectorIcon(VectorIconId id, 27 GFX_EXPORT ImageSkia CreateVectorIcon(VectorIconId id,
28 size_t dip_size, 28 size_t dip_size,
29 SkColor color); 29 SkColor color);
30 30
31 // As above, but also paints a badge defined by |badge_id| on top of the icon.
32 // The badge uses the same canvas size and default color as the icon.
33 GFX_EXPORT ImageSkia CreateVectorIconWithBadge(VectorIconId id,
34 size_t dip_size,
35 SkColor color,
36 VectorIconId badge_id);
37
31 #if defined(GFX_VECTOR_ICONS_UNSAFE) || defined(GFX_IMPLEMENTATION) 38 #if defined(GFX_VECTOR_ICONS_UNSAFE) || defined(GFX_IMPLEMENTATION)
32 // Takes a string of the format expected of .icon files and renders onto 39 // Takes a string of the format expected of .icon files and renders onto
33 // a canvas. This should only be used as a debugging aid and should never be 40 // a canvas. This should only be used as a debugging aid and should never be
34 // used in production code. 41 // used in production code.
35 GFX_EXPORT ImageSkia CreateVectorIconFromSource(const std::string& source, 42 GFX_EXPORT ImageSkia CreateVectorIconFromSource(const std::string& source,
36 size_t dip_size, 43 size_t dip_size,
37 SkColor color); 44 SkColor color);
38 #endif 45 #endif
39 46
40 } // namespace gfx 47 } // namespace gfx
41 48
42 #endif // UI_GFX_PAINT_VECTOR_ICON_H_ 49 #endif // UI_GFX_PAINT_VECTOR_ICON_H_
OLDNEW
« no previous file with comments | « ui/gfx/BUILD.gn ('k') | ui/gfx/paint_vector_icon.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698