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

Partial updates of non-opque QGraphicsItems blended with old content, if cached mode is enabled

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.6.3
    • 4.6.1
    • Widgets: GraphicsView
    • None
    • Linux X11, Maemo5, Maemo6
    • e9538ced914739129681362dea03ebc323602126

    Description

      A QGraphicsItem is using setCacheMode(QGraphicsItem::ItemCoordinateCache). When item invalidates only partial region, its updated region gets painted on top of the old content. If the item is non-opaque, the old content is shown below the newly painted content.

      Below might be the cause of the bug:

      qgraphicsscene.cpp, line4286

      if (!subPix.isNull())

      { // Blit the subpixmap into the main pixmap. pixmapPainter.begin(pix); // HERE painter should be in "Source" composition mode, not the default SourceOver pixmapPainter.setClipRegion(pixmapExposed); pixmapPainter.drawPixmap(br.topLeft(), subPix); pixmapPainter.end(); }

      Eg. QPainter composition mode should be "QPainter::CompositionMode_Source" in the if -branch:
      http://qt.gitorious.org/qt/qt/blobs/master/src/gui/graphicsview/qgraphicsscene.cpp#line4286

      Attachments

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

        Activity

          People

            ylopes Yoann Lopes
            kimkinnu Kimmo Kinnunen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes