PDF export of clipped pattern adds raster image (large file size)

Migrated from https://bugs.launchpad.net/inkscape/+bug/1653659
The minimal steps are basically the same as inkscape#86

Steps to reproduce:

What happened?

  • file is much larger than you would expect (1.4MB v 65KB for inkscape 0.91-1 on Windows 7, cmos_capacitor_91-1.pdf
  • reimporting back to Inkscape (internal import), we see that the file has large images, due to the 6 raster images that are used as masks for the pattern.
    • extra issues (not the focus of this issue) are that the pattern is used 3 times, although in the original svg, there is just one; and the pattern is not visible on import back to inkscape.

What should have happened?

  • no raster image is created to simulate the clipping, similar to previous behaviour on 0.91-1 on Windows 7
Sample attachments:

Version Info:

  • Inkscape 0.91 r13725, Ubuntu 14.04
  • Inkscape 0.92.0 15301 (snap build), Ubuntu 14.04
  • Inkscape 0.92.4 (cbf31a1a41, 2019-01-14) Linux Mint 20
  • Inkscape 1.1-dev (e00d4595c3, 2020-10-27) Linux Mint 20
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information