Skip to content
Snippets Groups Projects
  1. Jan 22, 2022
    • Nirbheek Chauhan's avatar
      meson: Fix usage of pkgconfig.generate() · adc07d46
      Nirbheek Chauhan authored
      The library that the pkgconfig file is for should be the first
      positional argument. The `libraries:` kwarg is for libraries that the
      user must also link against, and which meson does not know about (and
      hence cannot automatically add to the `Libs:` or `Requires:` section
      in the .pc file).
      
      Fixes:
      ```
      subprojects/pixman/meson.build:564: DEPRECATION: Library pixman-1 was
      passed to the "libraries" keyword argument of a previous call to
      generate() method instead of first positional argument. Adding
      pixman-1 to "Requires" field, but this is a deprecated behaviour that
      will change in a future version of Meson. Please report the issue if
      this warning cannot be avoided in your case.
      ```
      adc07d46
  2. Jan 21, 2022
  3. Jan 13, 2022
  4. Sep 17, 2021
  5. Aug 10, 2021
    • Manuel Stoeckl's avatar
      Fix masked pixel fetching with wide format · 5f5e752f
      Manuel Stoeckl authored
      
      In __bits_image_fetch_affine_no_alpha and __bits_image_fetch_general,
      when `wide` is true, the mask is actually an array of argb_t instead
      of the array of uint32_t it was cast to, and the access to `mask[i]`
      does not correctly detect when the pixel is nontrivial. The code now
      uses a check appropriate for argb_t when `wide` is true.
      
      One caveat: this new check only skips entries when the mask pixel data
      is binary all zero; this misses cases like `-0.f` which would be caught
      by the FLOAT_IS_ZERO macro. As the mask check only appears to be a
      performance optimization to avoid loading inconsequential pixels, it
      erring on the side of loading more pixels is safe.
      
      Signed-off-by: default avatarManuel Stoeckl <code@mstoeckl.com>
      5f5e752f
  6. Jul 21, 2021
  7. May 07, 2021
    • pkubaj's avatar
      Fix AltiVec detection on FreeBSD. · 4251202d
      pkubaj authored and Adam Jackson's avatar Adam Jackson committed
      4251202d
    • Jonathan Kew's avatar
      Avoid out-of-bounds read when accessing individual bytes from mask. · e93eaff5
      Jonathan Kew authored and Adam Jackson's avatar Adam Jackson committed
      The important changes here are a handful of places where we replace
      
                  memcpy(&m, mask++, sizeof(uint32_t));
      
      or similar code with
      
                  uint8_t m = *mask++;
      
      because we're only supposed to be reading a single byte from *mask,
      and accessing a 32-bit value may read out of bounds (besides that
      it reads values we don't actually want; whether this matters would
      depend exactly how the value in m is subsequently used).
      
      I've also changed a bunch of other places to use this same pattern
      (a local 8-bit variable) when reading individual bytes from the mask;
      the code was inconsistent about this, sometimes casting the byte to
      a uint32_t instead. This makes no actual difference, it just seemed
      better to use a consistent pattern throughout the file.
      e93eaff5
  8. Oct 22, 2020
  9. Jun 18, 2020
    • Dylan Baker's avatar
      meson: remove pixman dependency · 9b49f4e0
      Dylan Baker authored
      AFAICT from the git history, what happened is that the gtk demos rely on
      gtk being built with pixman support. pkg-config isn't really expressive
      enough to have that information, so the solution that was come up with
      was to search for pixman as well as gtk+ and hope that pixman being
      installed was.
      
      This isn't actually used anywhere in the meson build anyway, and it's
      causing problems for projects that want to use pixman as a supproject
      (there's a port of cairo underway that's hitting this), because it
      confuses meson.
      9b49f4e0
  10. Jun 02, 2020
  11. May 30, 2020
  12. May 11, 2020
    • Tom Stellard's avatar
      Add -ftrapping-math to default cflags · c2fe1568
      Tom Stellard authored
      This should resolve pixman/pixman#22
      and make the tests pass with clang.
      
      -ftrapping-math is already the default[1] for gcc, so this should not change
      behavior when compiling with gcc.  However, clang defaults[2] to -fno-trapping-math,
      so -ftrapping-math is needed to avoid floating-point expceptions when running the
      combiner and stress tests.
      
      The root causes of this issue is that that pixman-combine-float.c guards floating-point
      division operations with a FLOAT_IS_ZERO check e.g.
      
      if (FLOAT_IS_ZERO (sa))
      	f = 1.0f;
      else
      	f = CLAMP (da / sa);
      
      With -fno-trapping-math, the compiler assumes that division will never trap, so it may
      re-order the division and the guard and execute the division first.  In most cases,
      this would not be an issue, because floating-point exceptions are ignored.  However,
      these tests call enable_divbyzero_exceptions() which causes the SIGFPE signal to
      be sent to the program when a divide by zero exception is raised.
      
      [1] https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
      [2] https://clang.llvm.org/docs/UsersManual.html#controlling-floating-point-behavior
      c2fe1568
  13. Apr 26, 2020
  14. Apr 19, 2020
  15. Apr 14, 2020
  16. Apr 07, 2020
  17. Apr 02, 2020
  18. Mar 20, 2020
  19. Mar 19, 2020
  20. Mar 14, 2020
    • Antonio Ospite's avatar
      pixman-compiler.h: fix building tests with MinGW · 3344f507
      Antonio Ospite authored
      MinGW supports __declspec(dllexport) but the current logic that sets
      PIXMAN_EXPORT only uses it when building with MSVC, leaving some symbols
      hidden when building with MinGW.
      
      This results in an error when trying to link the tests:
      
      -----------------------------------------------------------------------
      FAILED: subprojects/pixman/test/combiner-test.exe
      x86_64-w64-mingw32-gcc  -o subprojects/pixman/test/combiner-test.exe 'subprojects/pixman/test/f48fa9c@@combiner-test@exe/combiner-test.c.obj' -Wl,--allow-shlib-undefined -Wl,--start-group subprojects/pixman/test/libtestutils.a subprojects/pixman/pixman/libpixman-1.dll.a -pthread -fopenmp -fopenmp -lm -mconsole -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 -Wl,--end-group
      /usr/bin/x86_64-w64-mingw32-ld: subprojects/pixman/test/f48fa9c@@combiner-test@exe/combiner-test.c.obj: in function `main':
      .../build/../subprojects/pixman/test/combiner-test.c:124: undefined reference to `_pixman_internal_only_get_implementation'
      collect2: error: ld returned 1 exit status
      ninja: build stopped: subcommand failed.
      -----------------------------------------------------------------------
      
      By using PIXMAN_API also when building with MinGW, the tests can link
      successfully and the build succeed.
      
      Tested with x86_64-w64-mingw32-gcc (GCC) 8.3-win32 20191201.
      3344f507
  21. Feb 20, 2020
  22. Jan 30, 2020
  23. Dec 19, 2019
  24. Nov 18, 2019
Loading