Bug 44394 - [Qt] TransparencyLayer: Always use anti-aliasing and smooth pixmap transform
Summary: [Qt] TransparencyLayer: Always use anti-aliasing and smooth pixmap transform
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: QtWebKit Unassigned
URL: http://dev.sencha.com/deploy/touch/ex...
Keywords: Qt, QtTriaged
Depends on:
Blocks:
 
Reported: 2010-08-22 02:53 PDT by Andreas Kling
Modified: 2010-08-22 05:12 PDT (History)
1 user (show)

See Also:


Attachments
Proposed patch (1.45 KB, patch)
2010-08-22 02:55 PDT, Andreas Kling
no flags Details | Formatted Diff | Diff
Comparison (bottom version is with patch) (22.65 KB, image/png)
2010-08-22 03:18 PDT, Andreas Kling
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kling 2010-08-22 02:53:48 PDT
We currently render things like -webkit-mask-box-image without anti-aliasing or bilinear transform which looks very poor.

An example can be found under User Interface / Icons on this page:
http://dev.sencha.com/deploy/touch/examples/kitchensink/
Comment 1 Andreas Kling 2010-08-22 02:55:43 PDT
Created attachment 65052 [details]
Proposed patch
Comment 2 Andreas Kling 2010-08-22 03:18:53 PDT
Created attachment 65054 [details]
Comparison (bottom version is with patch)
Comment 3 Ariya Hidayat 2010-08-22 04:30:23 PDT
Comment on attachment 65052 [details]
Proposed patch

WebCore/platform/graphics/qt/TransparencyLayer.h:55
 +          painter.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform);
Can't we copy the hints from p? Or does p have the wrong hints?
Comment 4 Andreas Kling 2010-08-22 04:39:48 PDT
(In reply to comment #3)
> (From update of attachment 65052 [details])
> WebCore/platform/graphics/qt/TransparencyLayer.h:55
>  +          painter.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform);
> Can't we copy the hints from p? Or does p have the wrong hints?

It has the wrong hints in this case. Regardless, when do we want to paint with a low quality mask?
Comment 5 Ariya Hidayat 2010-08-22 05:05:28 PDT
> It has the wrong hints in this case. Regardless, when do we want to paint with a low quality mask?

We don't, but it's up to the developer. One may want to call QWebFrame::render with low-quality because she is animating, capturing thumbnail only, or doing other funky stuff for which she care more about speed as opposed to pixel perfectness.
Comment 6 Ariya Hidayat 2010-08-22 05:06:55 PDT
Comment on attachment 65052 [details]
Proposed patch

r+ for this fix, as it works for now.

I guess I need to resume my render hints propagation investigation...
Comment 7 Andreas Kling 2010-08-22 05:12:40 PDT
Comment on attachment 65052 [details]
Proposed patch

Clearing flags on attachment: 65052

Committed r65784: <http://trac.webkit.org/changeset/65784>
Comment 8 Andreas Kling 2010-08-22 05:12:50 PDT
All reviewed patches have been landed.  Closing bug.