Not repainting properly on canvas animation




9 years ago
9 years ago


(Reporter: sicking, Assigned: vlad)



Bug Flags:
blocking1.9.2 +

Firefox Tracking Flags

(status1.9.2 beta4-fixed)




(1 attachment)

(this time i'm sure the page is using canvas :) )

On the following page:

Sometimes rendering turds are left in the upper left hand side corner. Steps to reproduce:

1. Load url
2. Wait for darkest wave to go all the way up in the upper left corner
3. Look closely as the wave is going down.

The turds vary in size, if you watch for a while some very obvious turds should appear.

This seems to be a regressions since 3.5
Flags: blocking1.9.2?
Page is using w/h 100% on the canvas element, which it attempts to set to the innerWidth/innerHeight of the window using an inline <script> after the canvas is created.  I don't think that's related.

Instead, I think that the problem is the "drawn region" computation isn't rounding out properly.  I'll look at this on Monday; I think it needs to block, and the patch should be a simple one.
Assignee: nobody → vladimir
Flags: blocking1.9.2? → blocking1.9.2+
Created attachment 412939 [details] [diff] [review]
Redraw on SetDimensions

So the bug here is that this testcase is using "canvas.width = canvas.width;" at the start of its draw loop as a way to clear/reset the canvas.  This is evil and horrible, but it's supposed to work (I'm going to file a separate bug to optimize this -- right now we always create a new surface, when we should be able to just clear the old one).  Before my optimized invalidation changes, the next time that canvas would be drawn into, the whole thing would get invalidated and all would be good.  But after, only the newly drawn portion got invalidated, so the entire canvas wasn't repainted, even though it's now fully transparent, leaving turds behind.

This patch just forces a full invalidate on every InitWithSurface call (which SetDimensions calls).
Attachment #412939 - Flags: review?(roc)
Last Resolved: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.