Closed Bug 976184 Opened 10 years ago Closed 10 years ago

canvasmark "click here" text rendered incorrectly

Categories

(Core :: Graphics: Canvas2D, defect)

ARM
Android
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla30

People

(Reporter: snorp, Assigned: gw280)

References

(Depends on 1 open bug, )

Details

Attachments

(2 files, 1 obsolete file)

Attached image canvasmark-text.png
With the latest Skia rebase (bug 910754), the "click or press space to run canvasmark" message at the beginning is rendered incorrectly.
We need a test case for whatever operation this is that keeps being problematic (fillText?).
:snorp, if you need this in 30, you're probably not going to get it out of George...
The following small test case reproduces the problem. It seems that drawing text with a shadow is completely busted. Surely we have a test for this?

var c = document.getElementById('c');
var ctx = c.getContext('2d');

ctx.fillStyle = 'red'
ctx.fillRect(0, 0, c.width, c.height);

ctx.fillStyle = 'black';
ctx.font = '12pt Arial';
ctx.shadowColor = 'white';
ctx.shadowOffsetX = 5;
ctx.shadowOffsetY = 5;
ctx.shadowBlur = 2;
ctx.fillText("Test", 50, 50);
It's busted with transparent images too.
Looks like we still need the patch from bug 884888.
Depends on: 884888
(In reply to Milan Sreckovic [:milan] from comment #2)
> :snorp, if you need this in 30, you're probably not going to get it out of
> George...

With comment 3 and 5 in mind, George will aim to fix it in 30.
Looks like due to bug 907351, we never use SkiaGL during reftests at all, even for once that explicitly exercise the canvas. Ugh.
Oh, I forgot that we weren't testing SkiaGL. Snorp and I had actually been discussing whether or not shadows were still broken. I will endeavour to get this fixed today as it shouldn't be too hard.
Comment on attachment 8387072 [details] [diff] [review]
0001-Bug-976184-Apply-a-drop-shadow-image-filter-to-our-S.patch

Matt's probably a better reviewer for this actually...
Attachment #8387072 - Flags: review?(snorp) → review?(matt.woodrow)
Comment on attachment 8387072 [details] [diff] [review]
0001-Bug-976184-Apply-a-drop-shadow-image-filter-to-our-S.patch

Review of attachment 8387072 [details] [diff] [review]:
-----------------------------------------------------------------

Much happy.
Attachment #8387072 - Flags: review?(matt.woodrow) → review+
Oops, didn't realise DrawSurfaceWithShadow operates in device space. Let's fix that. :)
Attachment #8387072 - Attachment is obsolete: true
Attachment #8387487 - Flags: review?(matt.woodrow)
Attachment #8387487 - Flags: review?(matt.woodrow) → review+
https://hg.mozilla.org/mozilla-central/rev/947d7ce90e26
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
Depends on: 987231
Depends on: 1132885
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: