Bug 756601 - Use NS_roundf so that it compiles on windows. CLOSED TREE
authorMatt Woodrow <mwoodrow@mozilla.com>
Fri, 10 May 2013 09:50:33 +1200
changeset 142398 ffd964f431949ac8e73eba82a31e4ef740c6b940
parent 142397 8011f4e535fa3f6b929fcd0b1ab003d022327381
child 142399 58c6702b5d84840673ca1d26401804dc4c92b3aa
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs756601
milestone23.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 756601 - Use NS_roundf so that it compiles on windows. CLOSED TREE
gfx/layers/opengl/CompositorOGL.cpp
--- a/gfx/layers/opengl/CompositorOGL.cpp
+++ b/gfx/layers/opengl/CompositorOGL.cpp
@@ -19,16 +19,18 @@
 
 #include "GLContextProvider.h"
 
 #include "nsIServiceManager.h"
 #include "nsIConsoleService.h"
 
 #include "gfxCrashReporterUtils.h"
 
+#include "nsMathUtils.h"
+
 #include "GeckoProfiler.h"
 #include <algorithm>
 
 #if MOZ_ANDROID_OMTC
 #include "TexturePoolOGL.h"
 #endif
 
 
@@ -541,20 +543,20 @@ CompositorOGL::BindAndDrawQuadWithTextur
   if (!mGLContext->CanUploadNonPowerOfTwo()) {
     realTexSize = IntSize(NextPowerOfTwo(realTexSize.width),
                           NextPowerOfTwo(realTexSize.height));
   }
 
   // We need to convert back to actual texels here to get proper behaviour with
   // our GL helper functions. Should fix this sometime.
   // I want to vomit.
-  IntRect texCoordRect = IntRect(roundf(aTexCoordRect.x * aTexture->GetSize().width),
-                                 roundf(aTexCoordRect.y * aTexture->GetSize().height),
-                                 roundf(aTexCoordRect.width * aTexture->GetSize().width),
-                                 roundf(aTexCoordRect.height * aTexture->GetSize().height));
+  IntRect texCoordRect = IntRect(NS_roundf(aTexCoordRect.x * aTexture->GetSize().width),
+                                 NS_roundf(aTexCoordRect.y * aTexture->GetSize().height),
+                                 NS_roundf(aTexCoordRect.width * aTexture->GetSize().width),
+                                 NS_roundf(aTexCoordRect.height * aTexture->GetSize().height));
 
   // This is fairly disgusting - if the texture should be flipped it will have a
   // negative height, in which case we un-invert the texture coords and pass the
   // flipped 'flag' to the functions below. We can't just use the inverted coords
   // because our GL funtions use an explicit flag.
   bool flipped = false;
   if (texCoordRect.height < 0) {
     flipped = true;