| OLD | NEW |
| 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 #include "ui/gfx/paint_vector_icon.h" | 5 #include "ui/gfx/paint_vector_icon.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <tuple> | 8 #include <tuple> |
| 9 | 9 |
| 10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
| 11 #include "base/lazy_instance.h" | 11 #include "base/lazy_instance.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/strings/string_number_conversions.h" | 13 #include "base/strings/string_number_conversions.h" |
| 14 #include "base/strings/string_split.h" | 14 #include "base/strings/string_split.h" |
| 15 #include "third_party/skia/include/core/SkPaint.h" | 15 #include "third_party/skia/include/core/SkPaint.h" |
| 16 #include "third_party/skia/include/core/SkPath.h" | 16 #include "third_party/skia/include/core/SkPath.h" |
| 17 #include "third_party/skia/include/core/SkXfermode.h" | 17 #include "third_party/skia/include/core/SkXfermode.h" |
| 18 #include "ui/gfx/canvas.h" | 18 #include "ui/gfx/canvas.h" |
| 19 #include "ui/gfx/image/canvas_image_source.h" | 19 #include "ui/gfx/image/canvas_image_source.h" |
| 20 #include "ui/gfx/scoped_canvas.h" | 20 #include "ui/gfx/scoped_canvas.h" |
| 21 #include "ui/gfx/vector_icon_types.h" | 21 #include "ui/gfx/vector_icon_types.h" |
| 22 #include "ui/gfx/vector_icons.h" | 22 #include "ui/gfx/vector_icons_public.h" |
| 23 | 23 |
| 24 namespace gfx { | 24 namespace gfx { |
| 25 | 25 |
| 26 namespace { | 26 namespace { |
| 27 | 27 |
| 28 // Translates a string such as "MOVE_TO" into a command such as MOVE_TO. | 28 // Translates a string such as "MOVE_TO" into a command such as MOVE_TO. |
| 29 CommandType CommandFromString(const std::string& source) { | 29 CommandType CommandFromString(const std::string& source) { |
| 30 #define RETURN_IF_IS(command) \ | 30 #define RETURN_IF_IS(command) \ |
| 31 if (source == #command) \ | 31 if (source == #command) \ |
| 32 return command; | 32 return command; |
| (...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 | 443 |
| 444 ImageSkia CreateVectorIconFromSource(const std::string& source, | 444 ImageSkia CreateVectorIconFromSource(const std::string& source, |
| 445 int dip_size, | 445 int dip_size, |
| 446 SkColor color) { | 446 SkColor color) { |
| 447 return ImageSkia( | 447 return ImageSkia( |
| 448 new VectorIconSource(source, dip_size, color), | 448 new VectorIconSource(source, dip_size, color), |
| 449 gfx::Size(dip_size, dip_size)); | 449 gfx::Size(dip_size, dip_size)); |
| 450 } | 450 } |
| 451 | 451 |
| 452 } // namespace gfx | 452 } // namespace gfx |
| OLD | NEW |