Last Comment Bug 691137 - Awry text rendering on canvas using hardware acceleration
: Awry text rendering on canvas using hardware acceleration
Status: VERIFIED FIXED
[qa!]
:
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: Trunk
: x86_64 Windows 7
: -- normal with 1 vote (vote)
: mozilla10
Assigned To: Bas Schouten (:bas.schouten)
:
Mentors:
Depends on:
Blocks: 651858
  Show dependency treegraph
 
Reported: 2011-10-02 03:38 PDT by Stanimir Stamenkov
Modified: 2013-12-27 14:24 PST (History)
16 users (show)
Ms2ger: in‑testsuite?
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
fixed
fixed


Attachments
Awry text rendering (92.43 KB, image/png)
2011-10-02 03:39 PDT, Stanimir Stamenkov
no flags Details
Correct text rendering (93.88 KB, image/png)
2011-10-02 03:41 PDT, Stanimir Stamenkov
no flags Details
testcase using typeface.js (132.28 KB, text/html)
2011-10-04 06:17 PDT, John Daggett (:jtd)
no flags Details
Use proper coordinates when adding a device space quadratic curve (1.01 KB, patch)
2011-10-10 05:40 PDT, Bas Schouten (:bas.schouten)
roc: review+
asa: approval‑mozilla‑aurora+
asa: approval‑mozilla‑beta+
Details | Diff | Splinter Review

Description Stanimir Stamenkov 2011-10-02 03:38:32 PDT
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0a1) Gecko/20111001 Firefox/10.0a1

STR: Open http://mercurial.selenic.com/ and observe headings.

Actual: Characters in headings look awry.

Expected: "Smooth" characters as seen with Firefox 6 and other browsers like IE 9, Safari 5.1 and Chrome 15 beta.

Turning the hardware acceleration off seems to correct the issue.

Last good build:

http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2011/06/2011-06-25-03-07-43-mozilla-central/firefox-7.0a1.en-US.win32.zip

First bad build:

http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2011/06/2011-06-26-03-07-56-mozilla-central/firefox-7.0a1.en-US.win32.zip

Regression range:

http://hg.mozilla.org/mozilla-central/pushloghtml?startdate=2011-06-25&enddate=2011-06-27
Comment 1 Stanimir Stamenkov 2011-10-02 03:39:51 PDT
Created attachment 564039 [details]
Awry text rendering

Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0a1) Gecko/20110626 Firefox/7.0a1
Comment 2 Stanimir Stamenkov 2011-10-02 03:41:00 PDT
Created attachment 564040 [details]
Correct text rendering

Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0a1) Gecko/20110625 Firefox/7.0a1
Comment 3 Nickolay_Ponomarev 2011-10-02 03:53:15 PDT
Likely regression from bug 651858.
Comment 4 Robert O'Callahan (:roc) (email my personal email if necessary) 2011-10-02 03:58:43 PDT
Azure isn't used to render HTML content, so that regression cause looks unlikely...
Comment 5 Jonathan Kew (:jfkthame) 2011-10-02 04:11:21 PDT
Looks like the site is using a JS library "typeface-0.15.js" that renders text using fonts defined in JS by drawing them to canvas (in this case, an Optima "clone" called "optimer_regular.typeface.js"), so the suggested regression _does_ sound plausible after all.
Comment 6 Olli Pettay [:smaug] 2011-10-02 04:13:20 PDT
This is rather bad (visual) regression.
Setting some flags...
Comment 7 Bas Schouten (:bas.schouten) 2011-10-02 06:09:20 PDT
This almost looks as if the flattening tolerance on the path is too high or something. A reduced canvas-only testcase would help a lot in diagnosing this.
Comment 8 John Daggett (:jtd) 2011-10-04 06:17:47 PDT
Created attachment 564536 [details]
testcase using typeface.js

Problem occurs on:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1

That's some ugly looking text...
Comment 9 Jeff Gilbert [:jgilbert] 2011-10-07 18:09:54 PDT
Test case also replicates for me on:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1
Comment 10 Bas Schouten (:bas.schouten) 2011-10-10 05:18:50 PDT
I've found the root cause of this issue, fix coming up.
Comment 11 Bas Schouten (:bas.schouten) 2011-10-10 05:40:24 PDT
Created attachment 565912 [details] [diff] [review]
Use proper coordinates when adding a device space quadratic curve

This fixes the issue that causes this.

Quite likely this bug can be worked around by moving the 'restore()' call in renderWord to before 'beginPath()' this would also improve the performance of the library.
Comment 12 Robert O'Callahan (:roc) (email my personal email if necessary) 2011-10-10 14:32:16 PDT
Comment on attachment 565912 [details] [diff] [review]
Use proper coordinates when adding a device space quadratic curve

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

oopsie
Comment 13 Asa Dotzler [:asa] 2011-10-10 15:02:02 PDT
Comment on attachment 565912 [details] [diff] [review]
Use proper coordinates when adding a device space quadratic curve

The release team won't be tracking this but please land the fix on Aurora and Beta.
Comment 14 Bas Schouten (:bas.schouten) 2011-10-10 17:38:03 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/9975c3dd08a6
Comment 15 Bas Schouten (:bas.schouten) 2011-10-10 17:38:34 PDT
Forgot this is only on inbound. Sorry for bugspam.
Comment 16 Marco Bonardo [::mak] 2011-10-11 02:39:19 PDT
https://hg.mozilla.org/mozilla-central/rev/9975c3dd08a6
Comment 17 :Ms2ger (⌚ UTC+1/+2) 2011-10-11 03:58:13 PDT
How hard would this be to test?
Comment 18 Bas Schouten (:bas.schouten) 2011-10-11 05:03:52 PDT
(In reply to Ms2ger from comment #17)
> How hard would this be to test?

Very easy, but considering the rather coincidental circumstances that surround this bug I'm not sure a test case would be that useful.

We actually test all the individual facets of this bug, just not the combination.
Comment 19 Jonathan Haas 2011-10-11 13:07:51 PDT
I thought this has to be landed on beta and aurora? (Comment 13)
Comment 21 AndreiD[QA] 2011-10-20 07:13:53 PDT
I tested to see if the issue is still visible after the landing of the fix; I took as example the testcare using  typeface.js in the attachment and got the following results:
Verified Fixed on:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0 (Beta)
 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0a2) Gecko/20111019 Firefox/9.0a2 (Aurora)
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0a1) Gecko/20111020 Firefox/10.0a1 (Nightly)

Since the issue (as it was reported in the Description) is not visible anymore after the landing of the fix, on all branches, setting this bug's resolution to Verified and the whiteboard entry to qa!

Note You need to log in before you can comment on or make changes to this bug.