diff options
| author | Rene Ladan <rene@FreeBSD.org> | 2013-10-11 15:33:47 +0000 |
|---|---|---|
| committer | Rene Ladan <rene@FreeBSD.org> | 2013-10-11 15:33:47 +0000 |
| commit | bc997e68ac05cb9a7272172ee92bcb43878b37ee (patch) | |
| tree | c85b32d5fa5b0d29e52ce267ed778e7c2cb83d8e /www/chromium/files/patch-ui__gfx__image__image_family.h | |
| parent | - Update to 0.31 (diff) | |
- Fix build on 10.
- Add an extra-patch to deal with the differences between the base
execinfo in 10 and the devel/libexecinfo port.
- Add a shebangfix for chrome-wrapper [1]
- Minor cleanup
Submitted by: Mk/Scripts/qa.sh [1]
Diffstat (limited to 'www/chromium/files/patch-ui__gfx__image__image_family.h')
| -rw-r--r-- | www/chromium/files/patch-ui__gfx__image__image_family.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/www/chromium/files/patch-ui__gfx__image__image_family.h b/www/chromium/files/patch-ui__gfx__image__image_family.h new file mode 100644 index 000000000000..7e13fcf2917a --- /dev/null +++ b/www/chromium/files/patch-ui__gfx__image__image_family.h @@ -0,0 +1,40 @@ +--- ui/gfx/image/image_family.h.orig 2013-09-03 03:09:09.000000000 -0400 ++++ ui/gfx/image/image_family.h 2013-09-12 18:02:08.000000000 -0400 +@@ -27,8 +27,16 @@ + // include high-DPI representations). + class UI_EXPORT ImageFamily { + private: +- // Forward declaration. +- struct MapKey; ++ // An <aspect ratio, DIP width> pair. ++ // A 0x0 image has aspect ratio 1.0. 0xN and Nx0 images are treated as 0x0. ++ struct MapKey : std::pair<float, int> { ++ MapKey(float aspect, int width) ++ : std::pair<float, int>(aspect, width) {} ++ ++ float aspect() const { return first; } ++ ++ int width() const { return second; } ++ }; + + public: + // Type for iterating over all images in the family, in order. +@@ -127,17 +135,6 @@ + const gfx::Image* GetBest(const gfx::Size& size) const; + + private: +- // An <aspect ratio, DIP width> pair. +- // A 0x0 image has aspect ratio 1.0. 0xN and Nx0 images are treated as 0x0. +- struct MapKey : std::pair<float, int> { +- MapKey(float aspect, int width) +- : std::pair<float, int>(aspect, width) {} +- +- float aspect() const { return first; } +- +- int width() const { return second; } +- }; +- + // Find the closest aspect ratio in the map to |desired_aspect|. + // Ties are broken by the thinner aspect. + // |map_| must not be empty. |desired_aspect| must be > 0.0. + |
