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

WASM: QML application high-dpi scaling error

    XMLWordPrintable

    Details

    • Platform/s:
      WebAssembly

      Description

      The WASM-based program on desktop browser works fine. But when I open this web page on an iOS device, the resolution of the program (Window.width & Window.height) is very large, just like the scaling (AA_EnableHighDpiScaling) is not enabled, this is or close to physical resolution of the screen. But at the same time Ratio (Screen.devicePixelRatio) is normal(2x or 3x like ratine display normal status).
      For this reason, the program consumes extremely high GPU resources and power. For example, even a simple page cannot be opened on iPhone 6 Plus, because the program will render at 9x resolution (1920*1080 resolution & 3x Screen.devicePixelRatio) compared to normal conditions (640*360 & 3x Ratio) or (1920* 1080 & 1x Ratio).
      I made a wasm test project, or can open directly with URL:

      http://shanghai.atcity.mobi:50003/test.html

       

      I opened this web page on iPhone 11 pro max, which is the only iPhone device that can run to 60FPS. Yes, a simple page needs A13 to reach 60FPS.
      The resolution of the program is 980*2017, which is obviously higher for a regular mobile phone program. But at the same time Ratio is 3.
      It can be seen from "Image" controls loaded the image of @3x, which verified the above situation.

       

       

        Attachments

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

          Activity

            People

            Assignee:
            sorvig Morten Sørvig
            Reporter:
            jasonwong Jason Wong
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes