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

QGraphicsScene background caching does not work well with Windows fractional scaling

XMLWordPrintable

    • Windows

      A minimal reproducer that is adapted from "diagram scene" example is attached. Build and run, then scroll around, one will see "tearing":

      If the screen is scaled, e.g. by 125% or 150%.

      That is due to

      view->setCacheMode(QGraphicsView::CacheBackground);
      

      Without caching, the problem is gone.

      Plus, "setDevicePixelRatio" does not help here. Tearing still happens no matter if QPixmap knows the correct pixel ratio or not.

      What original reporter suspects:
      The fundamental issue is that the cached background is a pixmap and it can only be shifted full pixels, where as the backgrond drawing happens to subpixel accuracy to the same backbuffer.

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

            bibr Andreas Aardal Hanssen
            luqiaochen Luqiao Chen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes