Closed Bug 382189 Opened 17 years ago Closed 13 years ago

Canvas behaves poorly with some transformations

Categories

(Core :: Graphics: Canvas2D, defect, P2)

x86
All
defect

Tracking

()

VERIFIED WORKSFORME

People

(Reporter: csthomas, Unassigned)

Details

Attachments

(1 file)

Attached file testcase
This non-reduced testcase eventually results in Firefox (2.0.0.3) / SeaMonkey (Gecko 1.8.1.2pre) eating up huge amounts of memory.  I suspect the cause is the ctx.scale() and/or ctx.translate() which are done repeatedly with no ctx.restore() between iterations.  Uncommenting ctx.restore() on line 158 makes the issue go away.

<biesi> your wormhole2 thing basically made X unusable
<biesi> I killed seamonkey from a console
<Hendikins> CTho: I had to do the same on here.

Steps to reproduce:
1. Open the testcase, let it run for a while (I'm guessing the scale/translate have to accumulate).

A reduced testcase might be as simple as one or two ridiculously large scale/translate calls with some drawing.
Component: General → Layout: Canvas
Still occurs on trunk on Mac.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Priority: -- → P2
Version: 1.8 Branch → Trunk
QA Contact: general → layout.canvas
There's nothing in the current canvas code that would cause eating of additional memory on lots of subsequent transforms as far as I can see.

I also cannot reproduce this issue in Nightly or Release. -> WFM

Please re-open if somebody is still seeing this.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WORKSFORME
Works for me on 7.0 on Windows and 6.0.1 on Linux.  Marking verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: