gfx/src/AppUnits.h
author Ting-Yu Lin <tlin@mozilla.com>
Fri, 10 Aug 2018 21:53:41 -0700
changeset 486422 975fd6febbeabdaf741f859f7f8b60ef1b297480
parent 439782 5f74d262924171a8fa0b4483a64f4cac34c4c9b8
child 505383 6f3709b3878117466168c40affa7bca0b60cf75b
permissions -rw-r--r--
Bug 1482665 Part 1 - Add constexpr to mozilla::AppUnitsPerCSSPixel() and mozilla::AppUnitsPerCSSInch(). r=dholbert Differential Revision: https://phabricator.services.mozilla.com/D3154

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * 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 {
constexpr inline int32_t AppUnitsPerCSSPixel() { return 60; }
constexpr inline int32_t AppUnitsPerCSSInch() { return 96 * AppUnitsPerCSSPixel(); }
} // namespace mozilla
#endif /* _NS_APPUNITS_H_ */