Last Comment Bug 644199 - canvas is painted with artefacts after unlocking screen
: canvas is painted with artefacts after unlocking screen
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Canvas: 2D (show other bugs)
: Trunk
: x86 Windows XP
: -- normal (vote)
: mozilla12
Assigned To: Bas Schouten (:bas.schouten)
:
:
Mentors:
Depends on:
Blocks:
  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:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
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 Alex Lakatos[:AlexLakatos] 2011-03-23 09:46:29 PDT
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
Comment 1 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 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 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 Bas Schouten (:bas.schouten) 2012-01-17 10:26:23 PST
https://hg.mozilla.org/integration/mozilla-inbound/rev/d0e25fc5a4dc
Comment 5 Joe Drew (not getting mail) 2012-01-17 17:50:43 PST
https://hg.mozilla.org/mozilla-central/rev/d0e25fc5a4dc

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