Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-99402

QML DropShadow + cache = broken rendering

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • P2: Important
    • None
    • 5.15.2
    • None
    • All

    Description

      This has always been this way and I have to assume something is wrong with either Qt docs or graphical effects.

      DropShadow docs encourage use of the `cached` property: "This property allows the effect output pixels to be cached in order to improve the rendering performance. [...]"

      But enabling it breaks rendering, and always has, for as long as I have known. Try this example:

      import QtQuick 2.15
      import QtGraphicalEffects 1.15
      
      Item {
      
          width: 500
          height: 500
      
          DropShadow {
              source: blueRect
              anchors.fill: blueRect
              radius: 80
              samples: 50
              cached: true // or false
          }
      
          Rectangle {
              id: blueRect
              color: "blue"
              width: 100
              height: 100
              anchors.centerIn: parent
              visible: false
          }
      }
      

      I can't find any way to set up this DropShadow, with layer effects or not (which btw, OT, is also broken, as layer effect dropshadow seems to render the dropshadow on top or something).

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            tokorpip Tomi Korpipää
            andrhans Andreas Aardal Hanssen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes