xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.

Opened 8 years ago

Closed 8 years ago

Last modified 8 months ago

#416 closed enhancement (fixed)

pixbuf_new_from_data or cairo take un-premultiplied rgb data

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: major Milestone: 0.11
Component: client Version:
Keywords: Cc:


r4151 does this, but it's slow and ugly.

Do this in-place properly, or at least return a string we can use directly.

Attachments (1)

mmap-argb-in-place.patch (986 bytes) - added by Antoine Martin 8 years ago.
remove unnecessary conversions with mmap codepath only

Download all attachments as: .zip

Change History (4)

Changed 8 years ago by Antoine Martin

Attachment: mmap-argb-in-place.patch added

remove unnecessary conversions with mmap codepath only

comment:1 Changed 8 years ago by Antoine Martin

Owner: changed from Antoine Martin to Antoine Martin
Status: newassigned

The problem is that:

  • we can get a string as data (from all encoders that can output with alpha: rgb, png, webp) or a class 'xpra.net.mmap_pipe.c_char_Array_409600' with mmap. A string cannot be used as writeable buffer but the c_char_Array can.
  • the data we pass to pixbuf_new_from_data() must be string or read-only buffer, not bytearray

The patch above skips the conversions for the mmap codepath, but we need something that also addresses the double-copy from the standard codepath.

comment:2 Changed 8 years ago by Antoine Martin

Resolution: fixed
Status: assignedclosed

Done in r4843 (see changeset for details)

  • mmap: zero copy
  • string buffers: one copy with numpy (cannot be avoided)
  • without numpy installed: two copies as before

More buffer work in #465

comment:3 Changed 8 months ago by migration script

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/416

Note: See TracTickets for help on using tickets.