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

Unified Diff: ui/gfx/paint_vector_icon.cc

Issue 2373633002: Improve ergonomics of CanvasImageSource -> gfx::ImageSkia. (Closed)
Patch Set: review comments Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/image/canvas_image_source.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/paint_vector_icon.cc
diff --git a/ui/gfx/paint_vector_icon.cc b/ui/gfx/paint_vector_icon.cc
index 70daac299d814079c90186065d3ec7a0a60060cb..1ac78e279589ec2a5125fb458621e99e339fa827 100644
--- a/ui/gfx/paint_vector_icon.cc
+++ b/ui/gfx/paint_vector_icon.cc
@@ -10,6 +10,7 @@
#include "base/i18n/rtl.h"
#include "base/lazy_instance.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "third_party/skia/include/core/SkPaint.h"
@@ -596,8 +597,8 @@ ImageSkia CreateVectorIconWithBadge(const VectorIcon& icon,
ImageSkia CreateVectorIconFromSource(const std::string& source,
int dip_size,
SkColor color) {
- return ImageSkia(new VectorIconSourceLegacy(source, dip_size, color),
- gfx::Size(dip_size, dip_size));
+ return CanvasImageSource::MakeImageSkia<VectorIconSourceLegacy>(
+ source, dip_size, color);
}
} // namespace gfx
« no previous file with comments | « ui/gfx/image/canvas_image_source.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698