forked from len0rd/rockbox
Implement HAVE_LCD_ENABLE and lcd_update_rect(). When Rockbox runs in the background
this greatly reduces CPU load. lcd_update_rect shoves a bit as well. CPU usage with Rockbox in background is between 3% (with a 200kbps vbr mp3) and 12% (320kbps cbr mp3), so it's low but still dependent on codecs and even particular files. Driving a WPS with peakmeter, e.g. the builtin one, adds about 30% cpu usage. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27689 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
f66a233bdb
commit
594110e962
4 changed files with 98 additions and 24 deletions
|
@ -78,6 +78,7 @@ public class RockboxActivity extends Activity {
|
|||
public void onResume()
|
||||
{
|
||||
super.onResume();
|
||||
|
||||
if (RockboxService.fb != null)
|
||||
{
|
||||
try {
|
||||
|
@ -91,8 +92,30 @@ public class RockboxActivity extends Activity {
|
|||
} catch (Exception e) {
|
||||
LOG(e.toString());
|
||||
}
|
||||
RockboxService.fb.resume();
|
||||
}
|
||||
}
|
||||
|
||||
/* this is also called when the backlight goes off,
|
||||
* which is nice
|
||||
*/
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
RockboxService.fb.suspend();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
RockboxService.fb.suspend();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
RockboxService.fb.suspend();
|
||||
}
|
||||
|
||||
private void LOG(CharSequence text)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue