[cairo] Fwd: cairo_paint() with GPU Buffer

Uli Schlachter psychon at znc.in
Wed Feb 13 15:18:50 UTC 2019


Hi,

On 11.02.19 11:50, Abimathi Natarajan wrote:
> I have tried using "av_hwframe_transfer_data()" API in FFMPEG to transfer
> GPU memory to CPU which takes approximately 16ms for a 4k frame and then
> passing that memory to cariro_image_surface_create_for_data().

that's already 25 times faster than the original code. I guess this
means my theory was right.

> However, to improve the performance of my code I need to use this GPU
> buffer directly.

Okay, can you do that somehow? I mean, can you somehow use GL to draw
things? From my limited understanding that should avoid a round-trip to
the GPU.

> Is there a way to make cairo_paint() work faster with uncached memory?

I don't know. Accessing GPU memory from the CPU is always slow, I heard.

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.


More information about the cairo mailing list