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

QBrush should be able to use QRectF subrect of its texture

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • None
    • GUI: Painting
    • None

    Description

      In QtWebKit we use QBrush to paint repeated image patterns, e.g. backgrounds and borders. Here are two improvements that could be achieved if QBrush allowed to use subrect of its QPixmap:

      • There are cases when WebKit needs to draw only part of the source image, now QPixmap::copy has to be used.
      • When texture has to be scaled and is used multiple times, we use optimization: texture is scaled up front before setting it to QBrush. This work was initially done by No'am Rosenthal at https://bugs.webkit.org/show_bug.cgi?id=50527. Problem is that scaled pixmap is rounded to the integer size, which leads to subpixel imperfectness is scale factor is not integer. Using larger QPixmap with correctly scaled QRectF paint area will make results identical with and without optimization.

      Attachments

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

        Activity

          People

            sletta Gunnar Sletta
            annulen Konstantin Tokarev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes