Last Comment Bug 644199 - canvas is painted with artefacts after unlocking screen
: canvas is painted with artefacts after unlocking screen
Product: Core
Classification: Components
Component: Canvas: 2D (show other bugs)
: Trunk
: x86 Windows XP
-- normal (vote)
: mozilla12
Assigned To: Bas Schouten (:bas.schouten)
: Milan Sreckovic [:milan]
Depends on:
  Show dependency treegraph
Reported: 2011-03-23 09:46 PDT by Alex Lakatos[:AlexLakatos]
Modified: 2012-01-17 17:50 PST (History)
6 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

screenshot (335.96 KB, image/jpeg)
2011-03-23 09:46 PDT, Alex Lakatos[:AlexLakatos]
no flags Details
Properly re-upload after clearing mTexture (1.07 KB, patch)
2012-01-15 19:37 PST, Bas Schouten (:bas.schouten)
roc: review+
Details | Diff | Splinter Review

Description User image Alex Lakatos[:AlexLakatos] 2011-03-23 09:46:29 PDT
Created attachment 521211 [details]

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
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
Comment 1 User image Robert O'Callahan (:roc) (email my personal email if necessary) 2011-03-23 14:33:48 PDT
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.
Comment 2 User image Bas Schouten (:bas.schouten) 2012-01-15 19:28:55 PST
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?
Comment 3 User image Bas Schouten (:bas.schouten) 2012-01-15 19:37:30 PST
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.
Comment 4 User image Bas Schouten (:bas.schouten) 2012-01-17 10:26:23 PST
Comment 5 User image Joe Drew (not getting mail) 2012-01-17 17:50:43 PST

Note You need to log in before you can comment on or make changes to this bug.