Chromium Code Reviews| Index: ui/gfx/image/image_family.h |
| diff --git a/ui/gfx/image/image_family.h b/ui/gfx/image/image_family.h |
| index c092b2a87ca521a4ff78678581fc332b3bfed8fa..e8920b9a88f44bc8530191e4a6dbbbee0da99c27 100644 |
| --- a/ui/gfx/image/image_family.h |
| +++ b/ui/gfx/image/image_family.h |
| @@ -136,6 +136,17 @@ class GFX_EXPORT ImageFamily { |
| // NULL. |
| const gfx::Image* GetBest(const gfx::Size& size) const; |
| + // Gets an image of size |width|x|height|. If no image of that exact size |
| + // exists, chooses the nearest larger image using GetBest() and scales it to |
| + // the desired size. If there are no images in the family, returns an empty |
| + // image. |
| + gfx::Image CreateExact(int width, int height) const; |
| + |
| + // Gets an image of size |size|. If no image of that exact size exists, |
| + // chooses the nearest larger image using GetBest() and scales it to the |
| + // desired size. If there are no images in the family, returns an empty image. |
| + gfx::Image CreateExact(const gfx::Size& size) const; |
|
Peter Kasting
2015/11/05 05:49:27
Does anyone call this variant? In an ideal world
Matt Giuca
2015/11/05 06:22:50
The code I've got lined up behind this uses the gf
Peter Kasting
2015/11/05 06:24:57
I don't think it's a big deal either way and you o
Robert Sesek
2015/11/05 16:05:56
I tend to agree with Peter that it'd be good to on
Matt Giuca
2015/11/06 04:15:18
OK since neither of you feel strongly, I'll keep i
|
| + |
| private: |
| // Find the closest aspect ratio in the map to |desired_aspect|. |
| // Ties are broken by the thinner aspect. |