Bug 49491 - [Qt] Path fill lacks blur shadow support
Summary: [Qt] Path fill lacks blur shadow support
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: QtWebKit Unassigned
URL:
Keywords: HTML5, Qt, QtTriaged
Depends on:
Blocks: 34479
  Show dependency treegraph
 
Reported: 2010-11-13 01:09 PST by Helder Correia
Modified: 2010-11-20 19:09 PST (History)
3 users (show)

See Also:


Attachments
Patch (7.98 KB, patch)
2010-11-13 01:11 PST, Helder Correia
no flags Details | Formatted Diff | Diff
Patch (8.04 KB, patch)
2010-11-19 16:57 PST, Helder Correia
no flags Details | Formatted Diff | Diff
Test for stroke gradient and fill, not path (8.47 KB, patch)
2010-11-19 17:31 PST, Helder Correia
no flags Details | Formatted Diff | Diff
Use the faster controlPointRect() (8.04 KB, patch)
2010-11-19 22:36 PST, Helder Correia
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Helder Correia 2010-11-13 01:09:29 PST
fillPath() will draw only solid shadows, even with shadowBlur set.
Comment 1 Helder Correia 2010-11-13 01:11:54 PST
Created attachment 73812 [details]
Patch
Comment 2 Andreas Kling 2010-11-15 02:19:41 PST
Comment on attachment 73812 [details]
Patch

What about filling with a gradient or pattern with alpha? Seems like it won't be covered by this change.
Comment 3 Helder Correia 2010-11-19 16:57:46 PST
Created attachment 74445 [details]
Patch
Comment 4 Helder Correia 2010-11-19 17:31:58 PST
Created attachment 74449 [details]
Test for stroke gradient and fill, not path
Comment 5 Helder Correia 2010-11-19 17:32:50 PST
Comment on attachment 74449 [details]
Test for stroke gradient and fill, not path

Added this patch to the wrong bug.
Comment 6 Andreas Kling 2010-11-19 20:54:49 PST
Comment on attachment 74445 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=74445&action=review

Looks good, except one thing:

> WebCore/platform/graphics/qt/GraphicsContextQt.cpp:550
> +            QPainter* shadowPainter = shadow->beginShadowLayer(p, path.boundingRect());

QPainterPath::boundingRect() is slow, you should use the controlPointRect() trick here since you only need an approximation.
Comment 7 Helder Correia 2010-11-19 22:36:21 PST
Created attachment 74468 [details]
Use the faster controlPointRect()
Comment 8 Andreas Kling 2010-11-19 22:38:52 PST
Comment on attachment 74468 [details]
Use the faster controlPointRect()

r=me
Comment 9 WebKit Commit Bot 2010-11-20 02:10:08 PST
Comment on attachment 74468 [details]
Use the faster controlPointRect()

Clearing flags on attachment: 74468

Committed r72472: <http://trac.webkit.org/changeset/72472>
Comment 10 WebKit Commit Bot 2010-11-20 02:10:14 PST
All reviewed patches have been landed.  Closing bug.