Large coordinates cause missing canvas paths (cairo fixed-point path issues)

RESOLVED FIXED in mozilla1.9alpha8

Status

()

Core
Canvas: 2D
RESOLVED FIXED
12 years ago
8 years ago

People

(Reporter: Gijs, Assigned: vlad)

Tracking

Trunk
mozilla1.9alpha8
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

12 years ago
Steps to reproduce:
[Testcase attached in a bit, listing js here doesn't make sense]

Actual results:
Empty canvas

Expected results:
Big green line

You can see a big green line if you change the last lineTo call to a moveTo call instead, or make the coordinates smaller.

I'm setting severity normal because I don't know if many people will experience this. I have a problem with it because I'm making an extension to render math functions, and I didn't exactly expect to have to implement my own magic not to display items outside the viewport...

Note that in this case, the coordinate number used is rather large. It *seems* that as a path has more nodes, the size of the coordinate number required to make the path vanish decreases.

I'm wondering if a keyword 'dataloss' is appropriate here or not. I'm not experienced in filing Core bugs, if someone else (more experienced than me in the subject at hand) thinks it is, please add it.

db48x reproduced this on linux with trunk from 'a day or two ago'. Marking Platform/OS all. Maybe this is a cairo problem?
(Reporter)

Comment 1

12 years ago
Created attachment 207517 [details]
Testcase
(Reporter)

Comment 2

12 years ago
eh. Linux reproduction build used was

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20051220 Firefox/1.6a1


I reproduced on a Windows 1.5 release build:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5

and current trunk:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060104 Firefox/1.6a1
Found the green line in the 1.9a1_2005081922 build but it was gone in the 1.9a1_2005082008 build.

http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=PhoenixTinderbox&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2005-08-19+21%3A00%3A00&maxdate=2005-08-20+08%3A00%3A00&cvsroot=%2Fcvsroot


Created attachment 219075 [details]
better testcase

Better testcase; the problem is that coordinates that are too large I think overflow the 16.16 internals inside cairo, and cause segments to not get rendered.
Attachment #207517 - Attachment is obsolete: true
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Canvas doesn't render paths with nodes far out of the viewport → Large coordinates cause missing canvas paths (cairo fixed-point path issues)
(Reporter)

Comment 5

11 years ago
Vlad: so if this is a Cairo problem, do 'we' have anything to fix and/or does a new version of Cairo (plan to) fix this problem?

FWIW, still broken on Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20061121 Minefield/3.0a1
But I suppose that's sorta expected...
It's nothing that we can really fix; there is some upstream cairo work going on in this area, but noone's tackled this yet.  Chances are that it probably won't get fixed anytime soon though, but we'll see.
Priority: -- → P3
Target Milestone: --- → mozilla1.9beta1
Depends on: 384681
Fixed by bug 384681, at least getting us to 24.8.
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Priority: P3 → --
Resolution: --- → FIXED
(Reporter)

Comment 8

8 years ago
(In reply to comment #7)
> Fixed by bug 384681, at least getting us to 24.8.

So my testcase now works, but yours doesn't... (3.5.5) What am I missing? :-)
You need to log in before you can comment on or make changes to this bug.