canvas is painted with artefacts after unlocking screen

RESOLVED FIXED in mozilla12

Status

()

Core
Canvas: 2D
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: AlexLakatos, Assigned: bas)

Tracking

Trunk
mozilla12
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

6 years ago
Created attachment 521211 [details]
screenshot

Build identifier: Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0

After unlocking the screen, the canvas element has artefacts from Windows's screen.

1.Go to http://ratemydrawings.com/bebraw/copyclip/copyclip.html
2.Lock the screen (START+L)
3.Unlock the screen

Actual Results:
3.The canvas is painted with artefacts from Windows's window

Expected Results:
3.The canvas is painted without artefacts
On Windows XP, locking the screen throws away VRAM, which means we lose the pixel data.

We could fix this in the short term by re-uploading the canvas image after it's been lost, but once we start using GPU acceleration for canvas drawing on XP, that won't work anymore. Unless we periodically "back up" the canvas image when idle, or something like that, but that won't always work and sounds like more effort than it's worth.
(Assignee)

Comment 2

6 years ago
We should be re-uploading when we reset the layer manager because of a screen lock, so this shouldn't be happening! Can anyone reproduce this bug?
(Assignee)

Comment 3

6 years ago
Created attachment 588804 [details] [diff] [review]
Properly re-upload after clearing mTexture

Not everyone can reproduce this bug probably, because a lot of drivers clear textures when created.

But we fail to upload properly after we detect no texture being present. When the surface is dirty we'll try to update, but bail after we create the missing texture. If the surface isn't dirty we won't re-upload at all.

This patch should fix that bug.
Assignee: nobody → bas.schouten
Status: NEW → ASSIGNED
Attachment #588804 - Flags: review?(roc)
Attachment #588804 - Flags: review?(roc) → review+
(Assignee)

Comment 4

6 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/d0e25fc5a4dc
https://hg.mozilla.org/mozilla-central/rev/d0e25fc5a4dc
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla12
You need to log in before you can comment on or make changes to this bug.