Closed Bug 753835 Opened 13 years ago Closed 13 years ago

[Azure] Text-shadow artifacts at descenders

Categories

(Core :: Graphics, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla15

People

(Reporter: Fanolian+BMO, Assigned: bas.schouten)

References

Details

Attachments

(4 files)

Attached image Text-shadow artifacts screenshot (deleted) —
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/15.0 Firefox/15.0a1 Build ID: 20120510030517 Steps to reproduce: Go to https://developer.mozilla.org/en/CSS/text-shadow, scroll to the examples. Actual results: In the second example, shadow artifacts appear at the descenders.
Blocks: 715768
Attached image Artifact for a specific text-shadow (deleted) —
Another STR: 1. Set gfx.content.azure.enabled to True. 2. Add the following CSS in Stylish (blank style), or both userChrome.css and userContent.css: * { text-shadow: 0px 0px 1px #909090 !important; } 3. Go to https://en.wikipedia.org/wiki/Descender NB1: The artifact is present only if the blur-radius is exactly 1px. NB2: The artifact is present at default zoom level only. ----------- The above text-shadow also creates artifacts on tabs with some page titles only.
Attached image Artifact on tabs by comment 1 (deleted) —
I suspect this is an artifact from not having EXTEND_NONE. Anyone who by any chance knows how these shadows are drawn back onto the final surface?
nsTextFrame::PaintOneShadow calls nsContextBoxBlur::DoPaint calls gfxAlphaBoxBlur::Paint calls gfxContext::Mask. Mask is called with a solid-color source and the blurred alpha as the mask surface.
Since mask is unbound my theory about EXTEND_NONE is probably correct, I'll look into adding a rectangular clip. That should fix this usecase without much of a performance cost.
You mean add a 1px border to the mask surface and clip to the original mask extents when drawing into the mask?
This patch should fix the issue.
Assignee: nobody → bas.schouten
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #623381 - Flags: review?(roc)
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #6) > You mean add a 1px border to the mask surface and clip to the original mask > extents when drawing into the mask? This solution seems easier. But I could do that if you'd have a strong preference.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
No longer blocks: 715768
Blocks: 715768
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: