NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 11 12 13 14 15 93 Next »
More "efficient" redraw?

 
  • 0 Vote(s) - 0 Average
More "efficient" redraw?
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,697
Threads: 767
Joined: Nov 2003
#11
2011-12-29, 07:35 PM
cncb Wrote:Well, as I said the built-in NPVR screensaver causes a temporary power spike when it moves the fixed image around so I imagine if it did this every second instead of every several seconds I would see the same constant extra power usage.
Did you try my suggestion of adding a logging message in GetRenderList() function of your plugin and your screen saver?
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,917
Threads: 956
Joined: May 2006
#12
2011-12-29, 07:35 PM (This post was last modified: 2011-12-29, 08:15 PM by mvallevand.)
I create UIStatic for the elements that make up regions on the screen and only render changes

Code:
albumArtScreen = new UiStatic("AlbumArt", new Hashtable(), skinHelperJukebox);
            playbackTime = new UiStatic("Playback", new Hashtable(), skinHelperJukebox);
            if (skinHelper.ElementIsDefined("TimeBar"))
            {
                timeBar = new UiStatic("TimeBar", new Hashtable(), skinHelperJukebox);
            }
            else
            {
                timeBar = null;
            }
            playlistDetails = new UiStatic("Current", new Hashtable(), skinHelperJukebox);

NPVR the helps by only changing elements that need to change.

Martin
cncb
Offline

Senior Member

Posts: 729
Threads: 112
Joined: Aug 2011
#13
2011-12-29, 07:53 PM
sub Wrote:Did you try my suggestion of adding a logging message in GetRenderList() function of your plugin and your screen saver?

I just did and you are of course right. It calls it once a second for several seconds and then starts calling it ~40 times each second when the power usage spikes. What issue in NeedsRendering() could cause this?
My Plugins: PhotoFilter, MusicMonkey, Windows Desktop Gadget
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,697
Threads: 767
Joined: Nov 2003
#14
2011-12-29, 07:55 PM
Did you put a different message in each of the two so you know if the problem is with the plugin or screensaver? Since you indicated it did it with the default screen saver, I'm guessing plugin?
cncb
Offline

Senior Member

Posts: 729
Threads: 112
Joined: Aug 2011
#15
2011-12-29, 07:59 PM
I only logged a message for my plugin's "screensaver" which is just a popup with a Black background and content that is refreshed every second.
My Plugins: PhotoFilter, MusicMonkey, Windows Desktop Gadget
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,697
Threads: 767
Joined: Nov 2003
#16
2011-12-29, 08:00 PM
Its probably something to do with NeedsRendering() returning true, but not getting a chance to render because of the screensaver being on top and gets rendered instead, so it gets in a bit of a tight loop.

There is a few ways to fix it, but given your code isnt in front of me, the easiest fix is probably what Martin suggested. at the top of your plugin's NeedsRendering() method add:

Code:
if (PluginHelperFactory.GetPluginHelper().ScreenSaverIsActive())
            {
                return false;
            }
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,697
Threads: 767
Joined: Nov 2003
#17
2011-12-29, 08:02 PM
If it's not the plugin, and seems to be caused by the screensaver (ie, happens regardless of what screen it's sitting on), then you'd need to take a look at your screen saver NeedsRendering() call to see what exactly is returning true continually and modify it to only true in the situations where you want the screen updated.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,917
Threads: 956
Joined: May 2006
#18
2011-12-29, 08:18 PM
cncb Wrote:I only logged a message for my plugin's "screensaver" which is just a popup with a Black background and content that is refreshed every second.

That's why I also return false on the main skin NeedsRendering() when PluginHelperFactory.GetPluginHelper().GetActivePopup() is true.

Martin
cncb
Offline

Senior Member

Posts: 729
Threads: 112
Joined: Aug 2011
#19
2011-12-29, 08:28 PM
I put another logging message in for GetRenderList() on the plugin screen (not the popup/screensaver). I then put in the check at the top of NeedsRendering() that you and Martin suggested. Testing with the default NPVR "FixedImage" screensaver, GetRenderList() for the plugin screen is still being called multiple times even with NeedsRendering() returning false? I also am logging when it returns false so I have verified it is returning false when the screensaver is active.
My Plugins: PhotoFilter, MusicMonkey, Windows Desktop Gadget
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,697
Threads: 767
Joined: Nov 2003
#20
2011-12-29, 08:36 PM
I know the built in screensaver isnt very optimal. With some options it produces a hole through which you can see the plugin below, so it renders the plugin too. Wattage wasnt high on my list of considerations. You're probably better off just focusing on your own plugin.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (6): « Previous 1 2 3 4 5 6 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  how to force redraw? Wakalaka 3 1,700 2007-03-27, 09:58 AM
Last Post: psycik

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode