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

HiDPI: The region of when call QWidgetPrivate::setSystemClip does not match the region that was imported when call QPlatformBackingStore::beginPaint

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.9.3
    • None
    • Linux/X11

    Description

      Example:
          The window device ratio is: 1.5
          We have a to be paint region:
             

      QRegion(size=3, bounds=(0,50 101x101) - [(0,50 100x1), (0,51 101x99), (1,150 100x1)]) QRect(0,50 101x101)

          The value of "systemClip" for paint engine after calling QWidgetPrivate::setSystemClip:
               

      QRegion(size=3, bounds=(0,75 152x152) - [(0,75 150x2), (0,77 152x148), (2,225 150x2)])
      


           The value of "region" in QPlatformBackingStore::beginPaint:
                

      QRegion(size=3, bounds=(0,75 152x152) - [(0,75 150x2), (0,77 152x149), (2,226 150x1)])
      

       

      QWidgetPrivate::setSystemClip uses the QTransform::map function to calculate "systemClip", but uses the QHighDpi::toNativeLocalRegion function in QBackingStore::beginPaint to calculate the new region. The results of these two functions tend to be inconsistent

      Attachments

        Issue Links

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

          Activity

            People

              sorvig Morten Sørvig
              zccrs JiDe Zhang
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes