Bug 907901. Remove NS_lround from rect.h. r=Bas

This commit is contained in:
Nicholas Cameron 2013-08-22 21:10:35 +12:00
parent 3aba9bbe8e
commit 2e6bc9e9b5

View File

@ -10,7 +10,8 @@
#include "BaseMargin.h"
#include "Point.h"
#include "Tools.h"
#include "nsMathUtils.h"
#include <cmath>
namespace mozilla {
namespace gfx {
@ -108,10 +109,10 @@ typedef RectTyped<UnknownUnits> Rect;
template<class units>
IntRectTyped<units> RoundedToInt(const RectTyped<units>& aRect)
{
return IntRectTyped<units>(NS_lround(aRect.x),
NS_lround(aRect.y),
NS_lround(aRect.width),
NS_lround(aRect.height));
return IntRectTyped<units>(int32_t(floorf(aRect.x + 0.5f)),
int32_t(floorf(aRect.y + 0.5f)),
int32_t(floorf(aRect.width + 0.5f)),
int32_t(floorf(aRect.height + 0.5f)));
}
template<class units>