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

Unified Diff: ui/gfx/paint_vector_icon.cc

Issue 1846513002: Make HasRepresentation() work better for vector images. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@deinline_imageskiastorage
Patch Set: Add DCHECK Created 4 years, 9 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/image_skia_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 7121fde314d5a6933fd93de8c7773f26c82ceac3..6091897f811fc773251f92deea66959cd3b0014f 100644
--- a/ui/gfx/paint_vector_icon.cc
+++ b/ui/gfx/paint_vector_icon.cc
@@ -309,6 +309,10 @@ class VectorIconSource : public CanvasImageSource {
~VectorIconSource() override {}
// CanvasImageSource:
+ bool HasRepresentationAtAllScales() const override {
+ return id_ != VectorIconId::VECTOR_ICON_NONE;
+ }
+
void Draw(gfx::Canvas* canvas) override {
if (path_.empty()) {
PaintVectorIcon(canvas, id_, size_.width(), color_);
« no previous file with comments | « ui/gfx/image/image_skia_source.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698