Re: Fwd: cairo_paint() with GPU Buffer

Uli Schlachter <[email protected]> Mon, 11 Feb 2019 09:07:11 +0100
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
Hi,

On 11.02.19 08:11, Abimathi Natarajan wrote:
[...]
>          The above command will decode the input file (input.mp4) with
> hardware accelerations(vaapi) and hwmap will directly map the hardware
>          frames to system memory.
[...]
>    - I will directly feed this memory to
> 
>                 cairo_image_surface_create_for_data ((unsigned char
> *)buffer, CAIRO_FORMAT_ARGB32,width, height, stride) to create a
> cairo_surface for the given frame.

From the information you provided, I can only make a guess. My guess is
that CPU access to the buffer in GPU memory is uncached and thus slow.

You could try copying the image to a buffer in main memory and using
that copy for cairo_image_surface_create_for_data(). That way
cairo/pixman get to operate on cached memory.

Cheers,
Uli
-- 
"Are you preparing for another war, Plutarch?" I ask.
"Oh, not now. Now we're in that sweet period where
everyone agrees that our recent horrors should never
be repeated," he says.
-- 
cairo mailing list
[email protected]
https://lists.cairographics.org/mailman/listinfo/cairo