Bug 19728 - [Qt] Support text-shadow blur
Summary: [Qt] Support text-shadow blur
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P3 Enhancement
Assignee: Ariya Hidayat
Keywords: Qt, QtTriaged
Depends on:
Blocks: 34479
  Show dependency treegraph
Reported: 2008-06-23 09:14 PDT by Jonathon Jongsma (jonner)
Modified: 2010-11-16 09:15 PST (History)
7 users (show)

See Also:

Screenshot of the result of applying the patch (278.71 KB, image/png)
2010-08-23 16:06 PDT, Ariya Hidayat
no flags Details
Patch (6.74 KB, patch)
2010-08-23 16:07 PDT, Ariya Hidayat
kenneth: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathon Jongsma (jonner) 2008-06-23 09:14:58 PDT
There is an initial patch to support text shadows in the Qt port (Bug #18459), but that doesn't yet support blur.  There is a commented-out function GraphicsContext::drawTextShadow() in the source that seems to have a blur implementation.  We should try to port this to the new text-shadow implementation.
Comment 1 Jonathon Jongsma (jonner) 2008-06-24 10:58:18 PDT
hm, I tried to port the old implementation and performance seemed incredibly bad.  I may have done something wrong, but my first impression is that it will be difficult to add blur support with decent performance.  I may come back to this later, but I'm moving on to other things for the moment.  If anybody else is interested in adding blur, feel free to grab this bug.
Comment 2 Simon Hausmann 2008-06-25 01:09:48 PDT
I can imagine that the performance is related to the FIXME's in the old code, which allocates a QImage with the size of the entire viewport.
Comment 3 Ariya Hidayat 2010-08-12 12:17:35 PDT
Add and assign to myself.
Comment 4 Ariya Hidayat 2010-08-12 12:20:01 PDT
See also https://bugs.webkit.org/show_bug.cgi?id=34479
Comment 5 Ariya Hidayat 2010-08-23 16:06:48 PDT
Created attachment 65169 [details]
Screenshot of the result of applying the patch

I have a patch ready, the attached screenshot shows the result of the blur shadow.
Comment 6 Ariya Hidayat 2010-08-23 16:07:41 PDT
Created attachment 65170 [details]
Comment 7 Kenneth Rohde Christiansen 2010-08-24 00:35:27 PDT
Comment on attachment 65170 [details]

Isn't there some way to factor some of this into online methods?
Comment 8 Ariya Hidayat 2010-08-24 00:41:39 PDT
> Isn't there some way to factor some of this into online methods?

It is not trivial since one works with QPainter::drawText while the other uses QTextLayout/QTextLine. It is unfortunate that the boilerplate for the prolog and epilog are similar, but I can't see a clean way to refactor them, without falling back to C-ism macro magic.
Comment 9 Ariya Hidayat 2010-08-24 02:02:30 PDT
Committed r65876: <http://trac.webkit.org/changeset/65876>
Comment 10 Ademar Reis 2010-11-16 09:15:53 PST
There must be a very good reason to include any more bugs as blockers for the qtwebkit-2.1 release at this point. Since I don't see one, I'm removing it from the blocking list. :-)

Feel free to add it as a *candidate* for inclusion (bug #44677) and please state the motivation/reason/requirement for it.