Bug 56580 - [Qt] Videos look ugly when using QGraphicsWebView.
Summary: [Qt] Videos look ugly when using QGraphicsWebView.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P1 Critical
Assignee: Alexis Menard (darktears)
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks:
 
Reported: 2011-03-17 12:34 PDT by Alexis Menard (darktears)
Modified: 2011-05-04 12:59 PDT (History)
7 users (show)

See Also:


Attachments
Proposed patch. (8.66 KB, patch)
2011-03-17 12:47 PDT, Alexis Menard (darktears)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.