An alternative to RGBA format for CefRenderHandler::OnPaint

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

An alternative to RGBA format for CefRenderHandler::OnPaint

Postby aligre » Fri Jan 26, 2024 6:01 am

Hello

In the callback CefRenderHandler::OnPaint, the input buffer is in BGRA format and, when the transparency is enabled, the BGR values are alpha premultiplied.
Also the origin of this buffer is upper-left.
In our application, textures are expected (by the visualization layer of code) to have an bottom-left origin and not to be alpha-premultiplied.
This constraint forces us to flip the buffer and, fortunatly rarely, to unmultiply by alpha coefficient.

Is there a way to specify to CEF to return a bottom-left not premultiplied buffer ?

Not sure but I think this kind of question has been already posted and the answer was no.
In that case, does an evolution of CEF possible in that way?

Thanks

ps : Of course, if this is not possible at all, we'll try to modify our visualization layer of code to accept CEF buffer format
aligre
Techie
 
Posts: 24
Joined: Fri Apr 09, 2021 7:38 am

Re: An alternative to RGBA format for CefRenderHandler::OnPa

Postby magreenblatt » Fri Jan 26, 2024 8:52 am

Is there a way to specify to CEF to return a bottom-left not premultiplied buffer ?

It’s not currently supported by CEF. Adding this option would require support in Chromium as a prerequisite.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 215 guests