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

broken colors when using drawPixmap for drawing QBitmap on QPixmap with transparency (ARGB32) on xcb native

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P5: Not important
    • None
    • 5.6.2, 5.13.1
    • QPA: X11/XCB
    • Any Linux, Any vncserver
    • Linux/X11

    Description

      The problems show up only using XCB NATIVE painting. Please find attached the source code and screenshots which illustrate the problem. For reference I have created screenshot using default painting engine to show correct results.

      We are using xcb native painting as experimental feature starting with 5.6.2 release. In latest code stream the native painting is a part of public API. However the problem is still there.

      In test application we set pen on a painter to red color 0xFFFF0000 (r=255, g=0, b=0, a=255). Then we draw a rectangle on QPixmap with transparent background (ARGB32). The color of that rectangle is as expected: 0xFFFF0000.

      Then we draw a bitmap with non transparent box in the middle. The color of that box in pixmap becomes transparent red 0x00FF0000 on a platform using 24 bit color depth and transparent green 0x0000F800 on a platform using 16 bit color depth. The latter could be reproduced using vncserver with "-depth 16" switch.

      Finally we draw a rectangle again using same painter. Unfortunately the pen color is already broken and colors of the last rectangle match the color of box in the middle drawn by drawPixmap call.

      To understand the problem we display the result pixmap in the window with grey background and also print the pixmap colors at 3 test points. The attached screenshots include the picture of the window and part of the terminal with colors of test points.

       

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            tskitishvili Karlo Tskitishvili
            Veli-Pekka Heinonen Veli-Pekka Heinonen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes