Bug 56580

Summary: [Qt] Videos look ugly when using QGraphicsWebView.
Product: WebKit Reporter: Alexis Menard (darktears) <menard>
Component: WebKit QtAssignee: Alexis Menard (darktears) <menard>
Status: RESOLVED FIXED    
Severity: Critical CC: abarth, benjamin, commit-queue, eric, hausmann, vestbo, webkit.review.bot
Priority: P1 Keywords: Qt, QtTriaged
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Proposed patch. none

Description Alexis Menard (darktears) 2011-03-17 12:34:01 PDT
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.

Background :

- 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.

Any feedback?
Comment 1 Alexis Menard (darktears) 2011-03-17 12:47:54 PDT
Created attachment 86081 [details]
Proposed patch.
Comment 2 WebKit Commit Bot 2011-03-17 15:14:31 PDT
Comment on attachment 86081 [details]
Proposed patch.

Clearing flags on attachment: 86081

Committed r81393: <http://trac.webkit.org/changeset/81393>
Comment 3 WebKit Commit Bot 2011-03-17 15:14:36 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 WebKit Review Bot 2011-03-17 15:23:12 PDT
http://trac.webkit.org/changeset/81393 might have broken Windows Release (Build) and Windows Debug (Build)
Comment 5 WebKit Commit Bot 2011-03-17 16:58:03 PDT
The commit-queue encountered the following flaky tests while processing attachment 86081 [details]:

animations/suspend-resume-animation.html bug 48161 (author: cmarrin@apple.com)
The commit-queue is continuing to process your patch.