Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
-
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.