Bug 44394

Summary: [Qt] TransparencyLayer: Always use anti-aliasing and smooth pixmap transform
Product: WebKit Reporter: Andreas Kling <kling>
Component: Layout and RenderingAssignee: QtWebKit Unassigned <webkit-qt-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ariya.hidayat
Priority: P2 Keywords: Qt, QtTriaged
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
URL: http://dev.sencha.com/deploy/touch/examples/kitchensink/
Attachments:
Description Flags
Proposed patch
none
Comparison (bottom version is with patch) none

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.