usplash transparency?

Asked by JT673

This might be the wrong place to ask this, but a splash I'm working on has transparency, but not alpha mixing. However, usplash displays the transparent part as black. What do I need to set the usplash_pixmap.transparent to? The index or the color?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu usplash-theme-ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Helton Dória (helton-doria) said :
#1

The Usplash doesn't support transparency.

Revision history for this message
JT673 (jt673) said :
#2

Then what's usplash_pixmap->transparency for?

Revision history for this message
Helton Dória (helton-doria) said :
#3

JT673,

I'm not an usplash especilist (I made only one theme yet) and it doesn't have much documentation on the Internet. As far as I know, it has no support to image transparency yet and this structure maybe a hook for future plans.

[]'s

Helton

Revision history for this message
kuwanger (kuwanger) said :
#4

I've looked at the source myself. It happens that usplash can use up to two backends for drawing. One is drawing to the framebuffer, if it exists. But, one can also compile in SVGA support, in case there doesn't exist a framebuffer. As it happens, Ubuntu doesn't automatically support the framebuffer--quoting /etc/modprobe.d/blacklist-frambuffer:

"
# Framebuffer drivers are generally buggy and poorly-supported, and cause
# suspend failures, kernel panics and general mayhem. For this reason we
# never load them automatically.
"

Well, as it happens, only the framebuffer backend actually supports the usplash_pixmap->tranparent feature. So, if you really want to have tranparency in your theme, you have three major options: one, manually load your framebuffer driver and get it working properly; two, alter the svga usplash backend yourself to add the transparency support; or three, try out my hack to include transparency support in svga (http://kuwanger.net/usplash-0.5.7-svga-mask.diff) patched against usplash v0.5.7, making sure to build with "BACKEND=svga make" to make sure svga support is included along with the default framebuffer support.

If you go with using my hack, please be aware that it is very much a hack and released as-is. Instead of doing the right thing, it merely takes advantage of something called gl_putboxmask. As a result, if it happens that the video depth used is 16bit, all blacks in a transparent-supporting pixmap on the screen won't be really black, just really close. And if the video depth used is 8bit, not only will your transparency color be transparent, but so will color 0 in a transparent-supporting pixmap. There may be some clipping issues also, though I haven't really looked into it to be sure.

Anyways, I hope this answers your question.

Can you help with this problem?

Provide an answer of your own, or ask JT673 for more information if necessary.

To post a message you must log in.