Steps to reproduce :
- Open QtTestBrowser.
- Menu Develop -> QGraphicsView -> Toggle use of QGraphicsView.
- Pick the iPod touch video (should be the default one).
- The poster looks ugly and the video too. We can clearly see some pixels. This does not happen when using QWebView.
- QWebView set some render hints to the painter activated by default : QPainter::TextAntialiasing | QPainter::SmoothPixmapTransform. You can override them with setRenderHints.
- QGraphicsWebView does not have this API. Indeed QGraphicsWebView does not own the painter, it receives it from the scene. Therefore we don't have any control of the painter we receive. The flags can be set or not. By default QGraphicsScene does not set them. That explain why the poster or the video looks ugly : QPainter::SmoothPixmapTransform is not set.
Here is my proposal :
We can have the same API as QWebView and set the flags on the painter when we render QGraphicsWebView. So at least the default looks nice. People can override the flags if they want. I don't think we should enforce them on the scene the QGraphicsWebView is living because those flags may slow down the rendering of a complete different item.
I also choose to add QPainter::TextAntialiasing | QPainter::SmoothPixmapTransform in addition of what is already set on the painter so we respect some behavior and we don't totally override the way QGV works.
Created attachment 86081 [details]
Comment on attachment 86081 [details]
Clearing flags on attachment: 86081
Committed r81393: <http://trac.webkit.org/changeset/81393>
All reviewed patches have been landed. Closing bug.
http://trac.webkit.org/changeset/81393 might have broken Windows Release (Build) and Windows Debug (Build)
The commit-queue encountered the following flaky tests while processing attachment 86081 [details]:
animations/suspend-resume-animation.html bug 48161 (author: firstname.lastname@example.org)
The commit-queue is continuing to process your patch.