PDA

View Full Version : How to set transparency use hardware ARGB?



Malion
19th March 2012, 10:52
Dear all,
I want to set the transparency in Qt, my hardware have several layers and allowed hardware Pixel Alpha blending.
I found Qt is also supported ARGB, and set the background with it. It works! And the widget on the background can also set the alpha to mix the Alpha value in background.
But it need a lost of time to do the the Alpha blending algorithm, if resolution set to 1080p,when i move the widget transparent to the background it become very slowly and CPU loading is very high.
My question is,If it is possible to set the ARGB value in the widget,direct assign it to the framebuffer.

ie. Background(R,G,B,A(oxFF)) (not blending)
Widget(R,G,B,A(0x77))
When the widget in the top level, the value A(0x77) is direct set to the framebuffer.

And how to achieve it?

wysota
19th March 2012, 11:25
If you have separate framebuffers for each layer then the best way would be to render appropriate data directly into appropriate buffers.

Malion
20th March 2012, 09:29
Because I need set semi-transprent in the osd layer to see the video layer. So i really need to speed up Qt to set the pixel Alpha blending.
The fastest way i thought, is set the top level pixel Alpha value direct to the frame buffer without mix it with background.
Does anyone know how to achieve it ?
Or there is another way to speed up the Alpha blending?