Summary: | [Qt] Graphics are pixelated after scaling/rotating | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Magnesus <magnesus2> | ||||
Component: | WebKit Qt | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Major | CC: | allan.jensen, ivan4th, magnesus2 | ||||
Priority: | P3 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Bug Depends on: | 113405 | ||||||
Bug Blocks: | |||||||
Attachments: |
|
Description
Magnesus
2011-12-15 04:29:57 PST
The same graphics are always smoothly transformer with the same settings on Qt 4.7.0. *smoothly transformed Will this be resolved soon? I have to decide if to stick with Qt or change to sth different because of this issue. More info: When transforming - rotating, scaling or even moving PNG images in QtWebKit they are pixelated for a long while and then suddently they are smooth. Still present in latest Qt4.8.0 (QtWebKit.dll has 4.9.0 version). Here is a before, after image: http://wieza.iq.pl/beforeafter.png (left: when the image is moving, right: half a second after it stops). I also found this bug reports: https://bugs.webkit.org/show_bug.cgi?id=41036 http://codereview.chromium.org/2881020/show Maybe they are related? Does anyone even read these? Created attachment 147551 [details]
workaround (patch)
I was affected by that problem too. When using sprite-based
animation (rapidly changing backgrounds) the animated image
becomes pixelated during frame changes. I've changed
GraphicsContextQt.cpp so it always uses
QPainter::SmoothPixmapTransform. After that change the problem
with non-smooth scaling disappeared and I didn't notice
any performance hit. Your mileage may vary though.
Note that my patch isn't meant for inclusion in QtWebKit, it's just a temporary fix for the problem (thus it comments out some lines). This sounds like intentional behavior. Using low interpolation during animations, and high when it is finished. That is done for performance reasons. To avoid this, you need accelerated compositing which is enabled by default in Qt 5 and QtWebKit 2.3. (In reply to comment #11) > This sounds like intentional behavior. Using low interpolation during animations, and high when it is finished. That is done for performance reasons. > > To avoid this, you need accelerated compositing which is enabled by default in Qt 5 and QtWebKit 2.3. Forget that. I am going to make it configurable, see bug 113405. With the fix for bug #113405 landed. I will consider the issue fixed. The current default behavior is working as designed, and can now be disabled with image-rendering: optimizeQuality (or image-rendering: smooth as it will be called in CSS4 Images when that gets activated). |