Bug 1573049 - silence filter node type warnings. r=jrmuizel
authorLee Salzman <lsalzman@mozilla.com>
Mon, 09 Sep 2019 20:25:03 +0000
changeset 553728 a5ebaf7bd46270dd1856c806ded8920ce1fec6a7
parent 553727 acd271126bbc17f6139f254a8fc62d108d2b4ba2
child 553729 a396b80f331f42b5e82a25c45fd24b7ed41befcd
push id12169
push userffxbld-merge
push dateMon, 14 Oct 2019 16:59:29 +0000
treeherdermozilla-beta@c819687300ed [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1573049
milestone71.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 1573049 - silence filter node type warnings. r=jrmuizel Differential Revision: https://phabricator.services.mozilla.com/D44903
gfx/2d/FilterNodeSoftware.cpp
--- a/gfx/2d/FilterNodeSoftware.cpp
+++ b/gfx/2d/FilterNodeSoftware.cpp
@@ -2292,39 +2292,41 @@ static inline void DebugOnlyCheckColorSa
   MOZ_ASSERT(aSampleAddress >= aBoundsBegin, "accessing before start");
   MOZ_ASSERT(aSampleAddress < aBoundsEnd, "accessing after end");
 }
 #else
 #  define DebugOnlyCheckColorSamplingAccess(address, boundsBegin, boundsEnd)
 #endif
 
 static inline uint8_t ColorComponentAtPoint(
-    const uint8_t* aData, int32_t aStride, const uint8_t* aBoundsBegin,
-    const uint8_t* aBoundsEnd, int32_t x, int32_t y, size_t bpp, ptrdiff_t c) {
+    const uint8_t* aData, ptrdiff_t aStride, const uint8_t* aBoundsBegin,
+    const uint8_t* aBoundsEnd, int32_t x, int32_t y, ptrdiff_t bpp,
+    ptrdiff_t c) {
   DebugOnlyCheckColorSamplingAccess(&aData[y * aStride + bpp * x + c],
                                     aBoundsBegin, aBoundsEnd);
   return aData[y * aStride + bpp * x + c];
 }
 
-static inline int32_t ColorAtPoint(const uint8_t* aData, int32_t aStride,
+static inline int32_t ColorAtPoint(const uint8_t* aData, ptrdiff_t aStride,
                                    const uint8_t* aBoundsBegin,
                                    const uint8_t* aBoundsEnd, int32_t x,
                                    int32_t y) {
   DebugOnlyCheckColorSamplingAccess(aData + y * aStride + 4 * x, aBoundsBegin,
                                     aBoundsEnd);
   return *(uint32_t*)(aData + y * aStride + 4 * x);
 }
 
 // Accepts fractional x & y and does bilinear interpolation.
 // Only call this if the pixel (floor(x)+1, floor(y)+1) is accessible.
 static inline uint8_t ColorComponentAtPoint(const uint8_t* aData,
-                                            int32_t aStride,
+                                            ptrdiff_t aStride,
                                             const uint8_t* aBoundsBegin,
                                             const uint8_t* aBoundsEnd, Float x,
-                                            Float y, size_t bpp, ptrdiff_t c) {
+                                            Float y, ptrdiff_t bpp,
+                                            ptrdiff_t c) {
   const uint32_t f = 256;
   const int32_t lx = floor(x);
   const int32_t ly = floor(y);
   const int32_t tux = uint32_t((x - lx) * f);
   const int32_t tlx = f - tux;
   const int32_t tuy = uint32_t((y - ly) * f);
   const int32_t tly = f - tuy;
   const uint8_t& cll = ColorComponentAtPoint(aData, aStride, aBoundsBegin,