Rockbox Development > Feature Ideas
"Backdrop" for viewports?
Software_Samurai:
I'd like to suggest the following new feature(s):
1. Viewports can be assigned an image as a "backdrop".
a. A view port may be assigned an image dynamically via the WPS tag "%VX<identifier>"
(i.e. %VXa for image a, %VXZ for image Z, etc.)
b. As a viewport is being processed and drawn, its backdrop would be drawn "first", followed by any other normal images/characters.
2. Viewport may define FF00FF as a background color, which would then be "transparent". This would allow overlapping viewports.
Opinions?
JdGordon:
1) backdrops for viewports are something that has been brought up a fwe times and I dont think there were any major objectinos to it, I tinhk the only thing against it is the amount RAM which would need to be set aside for the bitmap.
2) have you tried this? it might actually work now... hmm.. depends if the wps clears the viewport before redrawing or not.
Llorean:
I suspect that not only would the RAM cost be bad, but the added logic of having to reference the stored bitmaps for drawing each one could have a further performance hit.
Software_Samurai:
For the viewport's backdrop, I'm suggesting that the image comes from the global image pool. (i.e. %xl...) Theoretically there wouldn't be any more memory use than what could already be used. But yes, in practice I could see this feature causing people to want to use more/larger images in general.
Also, I'm suggesting adding just a bitmap pointer to the viewport struct. If it's zero, there's no backdrop assigned, otherwise, it just points to the bitmap image data.
Yes, I've tried this, and for me (and my H340) it seems to work very well. The lcd drivers get most of the code changes - especially the background "clearing" functions. I haven't noticed any significant performance impact. The only issue I've seen is that images that are called to be pre-loaded (%xl...) seem to actually get loaded only when they're actually needed the first time, so there's a noticeable delay when a viewport is first displayed.
It's really not a lot of additional code all in all.
linuxstb:
Will you post to the patch tracker?
Navigation
[0] Message Index
[#] Next page
Go to full version