Last Comment Bug 725247 - Turning the screen on doesn't repaint the screen
: Turning the screen on doesn't repaint the screen
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Widget (show other bugs)
: Trunk
: ARM Gonk (Firefox OS)
: -- normal (vote)
: ---
Assigned To: Kan-Ru Chen [:kanru] (UTC+8)
:
:
Mentors:
Depends on: 707589 714416
Blocks: b2g-demo-phone
  Show dependency treegraph
 
Reported: 2012-02-08 02:37 PST by Chris Jones [:cjones] inactive; ni?/f?/r? if you need me
Modified: 2012-04-05 20:58 PDT (History)
7 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Redraw when screen turns on (1.84 KB, patch)
2012-02-20 08:48 PST, Michael Wu [:mwu]
cjones.bugs: review+
Details | Diff | Splinter Review

Description User image Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-02-08 02:37:23 PST
STR
 (1) Find a page that doesn't invalidate all the freaking time
 (2) Load it
 (3) Turn off the screen
 (4) Turn it back on

The screen stays blank because nothing ever asks gonk widgetry to repaint.

We need some sort of notification when the screen is turned off/on.  Adding an nsIScreen method to deal with enable/disable should work just fine.  the screen impl can call the gonk method to do the real business.
Comment 1 User image Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-02-10 17:55:57 PST
Bug 714416 isn't a functional requirement for this, but it contains a small refactoring that we need to use here.
Comment 2 User image Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-02-15 12:15:13 PST
mwu want to grab this?
Comment 3 User image Michael Wu [:mwu] 2012-02-20 08:48:24 PST
Created attachment 598892 [details] [diff] [review]
Redraw when screen turns on
Comment 4 User image Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-02-20 08:55:09 PST
Comment on attachment 598892 [details] [diff] [review]
Redraw when screen turns on

r=me for direct-to-b2g
Comment 6 User image Michael Wu [:mwu] 2012-03-19 17:08:10 PDT
cjones, how do you want to proceed with this? I don't have any ideas for how to investigate this further.
Comment 7 User image Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2012-03-19 19:49:54 PDT
We should send out a notification from hal when the screen goes on/off and have nsWindow listen to that.  The rest of the approach here is fine.
Comment 8 User image Kan-Ru Chen [:kanru] (UTC+8) 2012-03-28 21:44:48 PDT
I want to implement bug 707589 which will also help this bug. The key is /sys/power/wait_for_fb_sleep and /sys/power/wait_for_fb_wake
Comment 9 User image Michael Wu [:mwu] 2012-03-29 15:23:00 PDT
(In reply to Kan-Ru Chen [:kanru] from comment #8)
> I want to implement bug 707589 which will also help this bug. The key is
> /sys/power/wait_for_fb_sleep and /sys/power/wait_for_fb_wake

Hm interesting. wait_for_fb_wake may avoid the problem we have in this bug where we have to redraw twice to get things to show.
Comment 10 User image Michael Wu [:mwu] 2012-03-29 18:50:02 PDT
Kanru has a better approach to this.
Comment 11 User image Kan-Ru Chen [:kanru] (UTC+8) 2012-04-05 20:58:43 PDT
Fixed by bug 707589 as a side effect. Verified on akami and sgs2.

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