Chromium Code Reviews| Index: ui/gfx/paint_vector_icon.cc |
| diff --git a/ui/gfx/paint_vector_icon.cc b/ui/gfx/paint_vector_icon.cc |
| index 91b00c9c507f95aefe283fa507a9d7707e29be13..afd30e34469ca546df766438bdbb642d7fd2c89a 100644 |
| --- a/ui/gfx/paint_vector_icon.cc |
| +++ b/ui/gfx/paint_vector_icon.cc |
| @@ -394,6 +394,18 @@ ImageSkia CreateVectorIconWithBadge(VectorIconId id, |
| return g_icon_cache.Get().GetOrCreateIcon(id, dip_size, color, badge_id); |
| } |
| +ImageSkia CreatePrimaryVectorIcon(VectorIconId id, SkColor color) { |
| + const PathElement* one_x_path = GetPathForVectorIconAt1xScale(id); |
| +#ifndef NDEBUG |
|
sky
2015/10/13 20:15:06
nit: if !defined(NDEBUG)
|
| + const PathElement* general_path = GetPathForVectorIcon(id); |
| + DCHECK_NE(one_x_path, general_path); |
| +#endif |
| + DCHECK_EQ(one_x_path[0].type, CANVAS_DIMENSIONS); |
| + |
| + const size_t size = one_x_path[1].arg; |
| + return CreateVectorIcon(id, size, color); |
| +} |
| + |
| ImageSkia CreateVectorIconFromSource(const std::string& source, |
| size_t dip_size, |
| SkColor color) { |