summaryrefslogtreecommitdiff
path: root/gst/gstregistry.c
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2024-04-24 00:52:18 +0530
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2024-04-25 12:43:07 +0000
commite7598ed521235911ec2d59eef215c93dafb19b01 (patch)
tree742ad679b183bb20177c662cdb03208b0232b3bf /gst/gstregistry.c
parent49f9a1e2241939e7e02163c39d565a54039d96e0 (diff)
rsvg: Disable deprecations instead of porting to new librsvg APIHEADmain
`rsvg_handle_get_dimensions()` and `rsvg_handle_render_cairo()` are deprecated, and the replacement librsvg functions as specified in the migration guide are `rsvg_handle_get_intrinsic_size_in_pixels()` and `rsvg_handle_render_document()`. However, those are not drop-in replacements, and actually have breaking semantics for our use-case: 1. `intrinsic_size_in_pixels()` requires SVGs to have width+height or the viewBox attribute, but `get_dimensions()` does not. It will calculate the geometry based on element extents recursively. 2. `render_cairo()` simply renders the SVG at its intrinsic size on the specified surface starting at the top-left, maintaining whatever transformations have been applied to the cairo surface, including distorted aspect ratio. However, `render_document()` does not do that, it is specifically for rendering at the specified aspect ratio inside the specified viewport, and if you specify a viewPort that does not match the aspect ratio of the SVG, librsvg will center it. Matching the old behaviour with the new APIs is a lot of work for no benefit. We'd be duplicating code that is already there in librsvg in one case and undoing work that librsvg is doing in the other case. The aspect ratio handling in this element is also kinda atrocious. There is no option to scale the SVG while maintaining the aspect ratio. Overall, element needs a rewrite. Let's just disable deprecations. The API is not going anywhere. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6726>
Diffstat (limited to 'gst/gstregistry.c')
0 files changed, 0 insertions, 0 deletions