Skip to content

qt: use custom geometry instead of clipping the image in RoundImage

Fatih Uzunoğlu requested to merge fuzun/vlc:qt-sc-rounding into master
  • This merge request enables making use of Qt Scene Graph to define a custom geometry for rounded rectangle shape. With this change, it is possible to make the generated image and texture opaque, as long as source image itself is opaque (which should be usually true for content images). I mentioned this some time ago as the preferred way of displaying rounded rectangle with image texture, finally I was able to achieve this by using simplified QPainterPath.
  • Motivation: Opaque primitives are said to be rendered faster due to not requiring blending and at the same time making it easier for the scene graph renderer to batch.
  • Antialiasing: I tried vertex interpolation for vertex antialiasing, but it did not work as intended. Multisampled AA works fine in this case. I will create a separate merge request for it. Custom geometry is enabled only when the associated window have multisampling enabled.
  • Only direct OpenGL and Qt RHI (Qt >= 5.14) are supported.
  • Atlas textures are supported. Compressed atlas textures should also be supported.
  • Radius change no longer triggers image regeneration.
Edited by Fatih Uzunoğlu

Merge request reports