Bug 147758 - Shadows don't draw on fillText when using a gradient fill
Summary: Shadows don't draw on fillText when using a gradient fill
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dean Jackson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-06 17:18 PDT by Dean Jackson
Modified: 2015-08-07 12:44 PDT (History)
3 users (show)

See Also:


Attachments
Patch (5.96 KB, patch)
2015-08-06 17:25 PDT, Dean Jackson
mmaxfield: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dean Jackson 2015-08-06 17:18:15 PDT
Shadows don't draw on fillText when using a gradient fill
Comment 1 Dean Jackson 2015-08-06 17:25:45 PDT
Created attachment 258426 [details]
Patch
Comment 2 Dean Jackson 2015-08-06 17:27:32 PDT
        <rdar://problem/20860912>
Comment 3 Myles C. Maxfield 2015-08-06 18:18:46 PDT
Comment on attachment 258426 [details]
Patch

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

> Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp:2384
> +            c->setLegacyShadow(shadowOffset, shadowRadius, shadowColor, shadowColorSpace);

In some cases, can't this shadow be drawn at the same time as the real text, simply by setting some state on the context? We should do that if it's possible.
Comment 4 Dean Jackson 2015-08-06 18:26:48 PDT
Comment on attachment 258426 [details]
Patch

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

>> Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp:2384
>> +            c->setLegacyShadow(shadowOffset, shadowRadius, shadowColor, shadowColorSpace);
> 
> In some cases, can't this shadow be drawn at the same time as the real text, simply by setting some state on the context? We should do that if it's possible.

That's what we normally do. But in this case the real text is drawn just after here, into a mask, and then the mask applies to a pattern or gradient. So this is why we need to draw the shadow separately, before.
Comment 5 Dean Jackson 2015-08-07 12:44:41 PDT
Committed r188148: <http://trac.webkit.org/changeset/188148>