Closed Bug 696321 Opened 13 years ago Closed 13 years ago

ie.microsoft.com/testdrive/Performance/ParticleAcceleration - Garbage is left in screen canvas drawing.

Categories

(Core :: Graphics, defect)

x86
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: alice0775, Assigned: bas.schouten)

References

(Blocks 1 open bug, )

Details

(Keywords: regression)

Attachments

(1 file)

Attached image Screen shot (deleted) —
Build Identifier: http://hg.mozilla.org/mozilla-central/rev/311fdb9b38b7 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0a1) Gecko/20111020 Firefox/10.0a1 ID:20111020031025 Garbage is left in screen canvas drawing. Disabled canvas azure helps(i.e I set gfx.canvas.azure.enabled to false). Reproducible: Always Steps to Reproduce: 1. Start Firefox with clean profile 2 Open URL ( http://ie.microsoft.com/testdrive/Performance/ParticleAcceleration/ ) Actual Results: Garbage is left in screen canvas drawing. Expected Results: No garbage Regression window(m-c), Works: http://hg.mozilla.org/mozilla-central/rev/450e4d9ea2d5 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0a1) Gecko/20110624 Firefox/7.0a1 ID:20110625025936 Fails: http://hg.mozilla.org/mozilla-central/rev/48ad4ffc4230 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0a1) Gecko/20110625 Firefox/7.0a1 ID:20110625030821 pushlog: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=450e4d9ea2d5&tochange=48ad4ffc4230 Regression window(m-i), Works http://hg.mozilla.org/integration/mozilla-inbound/rev/c65f1fb0449d Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0a1) Gecko/20110624 Firefox/7.0a1 ID:20110624094307 Crash(cannot run url): http://hg.mozilla.org/integration/mozilla-inbound/rev/c65f1fb0449d Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0a1) Gecko/20110624 Firefox/7.0a1 ID:20110624094307 http://hg.mozilla.org/integration/mozilla-inbound/rev/11e15aabd2c1 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0a1) Gecko/20110624 Firefox/7.0a1 ID:20110624111756 Fails: http://hg.mozilla.org/integration/mozilla-inbound/rev/aede8422cdc4 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0a1) Gecko/20110624 Firefox/7.0a1 ID:20110624130320 Pushlog: http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=c65f1fb0449d&tochange=aede8422cdc4 Suspected: Bug 651858 - [Azure] Implement Direct2D Azure Backend
Graphics Adapter Description: ATI Radeon HD 4300/4500 Series Vendor ID: 1002 Device ID: 954f Adapter RAM: 512 Adapter Drivers: aticfx64 aticfx64 aticfx32 aticfx32 atiumd64 atidxx64 atiumdag atidxx32 atiumdva atiumd6a atitmm64 Driver Version: 8.892.0.0 Driver Date: 9-8-2011 Adapter RAM (GPU #2): Unknown Adapter Drivers (GPU #2): Unknown Direct2D Enabled: true DirectWrite Enabled: true (6.1.7601.17563) ClearType Parameters: Gamma: 2200 Pixel Structure: RGB ClearType Level: 100 Enhanced Contrast: 50 WebGL Renderer: Google Inc. -- ANGLE (ATI Radeon HD 4300/4500 Series) -- OpenGL ES 2.0 (ANGLE 0.0.0.774) GPU Accelerated Windows: 1/1 Direct3D 10
Assignee: nobody → bas.schouten
Status: NEW → ASSIGNED
So, something interesting is going on, this is essentially all due to rounding errors, the transform that we have set has an 0.99993473 scale. This causes the rect we end up clearing to start at 0.03 instead of 0. Effectively not fully clearing the top line, I'm investigating this further.
So, this rounding error works like this: What this demo is going is continuously scaling by x, and then by the reciprocal of x, and assuming the matrix will be identical to what it was. This works most of the time, but for some scales this seems to result in a rounding error. Since the matrix is never reset this rounding error gets cumulatively worse. Due to large number of times this is happening, the error gets bad enough to cause artifacts pretty quickly.
Roc, what do you think? I'm looking at Demo.js around line 329. It seems to be that's just bad practice, without the save restore, or manually setting the transform back to what it was this would probably just work. Assuming a * s * 1/s to always return a again is simply a false assumption in floating point I think.
Yes. Maybe we should detect transform components being very close to integers and snap them to integers?
IE9 suffers from this issue just as much after running this for a short while.
OK.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → WONTFIX
Well it looks like it was fixed at some point because Firefox 18 doesn't exhibit this issue, but with 19+ it's back again.
Once again, disabling Azure Gfx Content fixes it.
Actually strike that last message, changing enabling Azure Canvas in Firefox 18 makes the garbage appear but in 19+ the garbage always shows regardless of the Azure Canvas setting.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: