Bug 49491

Summary: [Qt] Path fill lacks blur shadow support
Product: WebKit Reporter: Helder Correia <helder>
Component: CanvasAssignee: QtWebKit Unassigned <webkit-qt-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, kling, mdelaney7
Priority: P2 Keywords: HTML5, Qt, QtTriaged
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 34479    
Attachments:
Description Flags
Patch
none
Patch
none
Test for stroke gradient and fill, not path
none
Use the faster controlPointRect() none

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.