Blank background on a panel of a CE software remote

Have an idea for a new feature? Voice your opinion here.
Post Reply
dlmorgan999
HouseBot Special Member
Posts: 409
Joined: Tue Jul 13, 2004 9:13 am
Location: Tigard, OR

Blank background on a panel of a CE software remote

Post by dlmorgan999 »

This is something I mentioned earlier but now I have more details. I have some rather large themes and I've gotten to the point now where sometimes when I open a panel the background is plain white rather than the background selected for the panel. In researching this a bit further here is what I know:



- this only affects CE remotes (my ViewPad); the X86 remotes seem fine

- only the panels at the end of the theme are affected

- this may be coincidental but it seems to happen once the theme file is greater than 192KB



I can easily make this come and go or move around by copying a theme and then deleting various panels. If I delete a few and then add them back (so that the problem panel which was the last panel is now a few before the end) the problem panel is now fine and the ones at the end have a problem.



I'm fairly certain this isn't a memory issue on my ViewPad as it has 128MB and I can check memory usage while the remote is running and I have about 40MB free. I'm wondering if there is some sort of memory structure being set up differently for the CE remotes than what you do for the X86 remotes and perhaps you are running out of memory?



-- Dave
ScottBot
Site Admin
Posts: 2787
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Re: Blank background on a panel of a CE software remote

Post by ScottBot »

dlmorgan999 wrote:I'm wondering if there is some sort of memory structure being set up differently for the CE remotes than what you do for the X86 remotes and perhaps you are running out of memory?
Although there are differences for the different platforms, there is no difference in the general way that Themes and their backgrounds are handled between the platforms. For example, there's no big 'Theme Background Memory Block" that gets filled in with all of the images. It's very object oriented and each Theme object has Panel objects that have Control objects, etc.



It does definitely sound like some sort of memory/resource issue. It may not actually be a physical memory limitation, as much as a resource issue. For example, some video drivers may have limits on the number of device contexts, or various GDI handles that they can manage at one time.



For the sake of speed in switching Panels, the Software Remotes actually load all of the Panels at startup (you can see this when it is loading). Unfortunately, this is very resource intensive and provides for a memory/resource footprint with the cumulative size of the Theme. I've considered changing this model to load the Panels on Demand, but never tried it. My fear is always that it would be a lot of work only to find the performance worse.
Scott
dlmorgan999
HouseBot Special Member
Posts: 409
Joined: Tue Jul 13, 2004 9:13 am
Location: Tigard, OR

Post by dlmorgan999 »

For example, some video drivers may have limits on the number of device contexts, or various GDI handles that they can manage at one time.
I was actually thinking the same thing but when you mentioned video drivers I remembered that when I configured the ViewPad I set it to 24-bit video (I found that until I did that the Violet background was very "banded"). I just did a test and changed it to 16-bit and everything is displaying correctly again. Thanks for the debug help! :)

I suspect this is just prolonging the onset of the problem but it may be good enough for me since I'm not planning to add very many more panels. I noticed that your red background looks fine on 16-bit. I wonder what it would take to make the violet background look good on 16-bit?
I've considered changing this model to load the Panels on Demand, but never tried it. My fear is always that it would be a lot of work only to find the performance worse.


I suspect you are correct in this concern. On-demand loading would be very nice but (especially on the CE devices) I think the performance hit would be noticable.



-- Dave
ScottBot
Site Admin
Posts: 2787
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

dlmorgan999 wrote:I wonder what it would take to make the violet background look good on 16-bit?
One big difference between the Red and Violet images is that the red are saved as PNG, whereas the violet is BMP. You might want to convert the violet to PNG and see if it renders better. PNG probably does a better job at managing the palette than BMP.



If it is a palette issue, you might be able to get better results by using a common palette for all of the images. The stock Theme images that I've created DON'T use a common palette.
Scott
dlmorgan999
HouseBot Special Member
Posts: 409
Joined: Tue Jul 13, 2004 9:13 am
Location: Tigard, OR

Post by dlmorgan999 »

That sounds good - I'll give it a try. The background I'm using is one I already scaled up to 800 x 600 from one of yours. I'll just open it again in Photoshop and convert it to PNG. Since that's really where the issue seems to be (with the background) this will be quick and easy to test.



-- Dave
dlmorgan999
HouseBot Special Member
Posts: 409
Joined: Tue Jul 13, 2004 9:13 am
Location: Tigard, OR

Post by dlmorgan999 »

Well the banding is still there with the PNG (I also see it when I use remote desktop to do development on the HouseBot server) but the file size is MUCH smaller (it went from 470k to 20k!). My guess is that the banding is due to the fact that the violet skin uses gradients and the Red one does not. I may just need to come up with my own images that are "ViewPad friendly". Graphics are not one of my stronger areas but I'm sure I can come up with something (I understand what you were talking about with regards to a common pallette but I have no idea how to do that).



-- Dave
Post Reply