Bug 1482665 Part 1 - Add constexpr to mozilla::AppUnitsPerCSSPixel() and mozilla::AppUnitsPerCSSInch(). r=dholbert
authorTing-Yu Lin <tlin@mozilla.com>
Fri, 10 Aug 2018 21:53:41 -0700
changeset 486422 975fd6febbeabdaf741f859f7f8b60ef1b297480
parent 486421 77038440246afb2d878f129dffd4b7c2af6b38ec
child 486423 f61b7e1a0216dc7e006526e266e0ab4bc7ef084d
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1482665
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1482665 Part 1 - Add constexpr to mozilla::AppUnitsPerCSSPixel() and mozilla::AppUnitsPerCSSInch(). r=dholbert Differential Revision: https://phabricator.services.mozilla.com/D3154
gfx/src/AppUnits.h
--- a/gfx/src/AppUnits.h
+++ b/gfx/src/AppUnits.h
@@ -5,12 +5,12 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_AppUnits_h
 #define mozilla_AppUnits_h
 
 #include <stdint.h>
 
 namespace mozilla {
-inline int32_t AppUnitsPerCSSPixel() { return 60; }
-inline int32_t AppUnitsPerCSSInch() { return 96 * AppUnitsPerCSSPixel(); }
+constexpr inline int32_t AppUnitsPerCSSPixel() { return 60; }
+constexpr inline int32_t AppUnitsPerCSSInch() { return 96 * AppUnitsPerCSSPixel(); }
 } // namespace mozilla
 #endif /* _NS_APPUNITS_H_ */