• Chris Wilson's avatar
    app: Use SHM transport for data transfer for display · 4a81849e
    Chris Wilson authored
    Recent Cairo uses SHM transports when available, and exposes the ability
    for its users to manage images shared between it and the display.
    This allows us to eliminate copies, and if the architecture supports it
    even to upload directly into GPU addressable memory without any copies
    (all in normal system memory so we suffer no performance penalty when
    applying the filters). The caveat is that we need to be aware of the
    synchronize requirements, the cairo_surface_flush and
    cairo_surface_mark_dirty, around access to the transport image. To
    reduce the frequency of these barriers, we can subdivide the transport
    image into small chunks as to satisfy individual updates and delay the
    synchronisation barrier until we are forced to reuse earlier pixels.
    
    Note this bumps the required Cairo version to 1.12, and please be aware
    that the XSHM transport requires bug fixes from cairo.git (will be
    1.12.12)
    
    v2: After further reflections with Mitch, we realized we can share the
    transport surface between all canvases by attaching it to the common
    screen.
    
    v3: Fix a couple of typos in insert_node() introduced when switching
    variables names.
    
    v4: Encapsulating within an image surface rather than a subsurface was
    hiding the backing SHM segment from cairo, causing it to allocate
    further SHM resources to stream the upload. We should be able to use a
    sub-surface here, but it is more convenient to wrap the pixels in an
    image surface for rendering the filters (and conveniently masking the
    callee flushes from invalidating our parent transport surface).
    
    Cc: Michael Natterer <mitch@gimp.org>
    4a81849e
Name
Last commit
Last update
app Loading commit data...
build Loading commit data...
cursors Loading commit data...
data Loading commit data...
desktop Loading commit data...
devel-docs Loading commit data...
docs Loading commit data...
etc Loading commit data...
libgimp Loading commit data...
libgimpbase Loading commit data...
libgimpcolor Loading commit data...
libgimpconfig Loading commit data...
libgimpmath Loading commit data...
libgimpmodule Loading commit data...
libgimpthumb Loading commit data...
libgimpwidgets Loading commit data...
m4macros Loading commit data...
menus Loading commit data...
modules Loading commit data...
plug-ins Loading commit data...
po Loading commit data...
po-libgimp Loading commit data...
po-plug-ins Loading commit data...
po-python Loading commit data...
po-script-fu Loading commit data...
po-tags Loading commit data...
po-tips Loading commit data...
themes Loading commit data...
tools Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
ChangeLog.pre-1-0 Loading commit data...
ChangeLog.pre-1-2 Loading commit data...
ChangeLog.pre-2-0 Loading commit data...
ChangeLog.pre-2-2 Loading commit data...
ChangeLog.pre-2-4 Loading commit data...
ChangeLog.pre-2-6 Loading commit data...
ChangeLog.pre-git Loading commit data...
HACKING Loading commit data...
INSTALL Loading commit data...
LICENSE Loading commit data...
MAINTAINERS Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
NEWS.pre-2-0 Loading commit data...
NEWS.pre-2-2 Loading commit data...
NEWS.pre-2-4 Loading commit data...
NEWS.pre-2-6 Loading commit data...
README Loading commit data...
README.i18n Loading commit data...
acinclude.m4 Loading commit data...
authors.dtd Loading commit data...
authors.xml Loading commit data...
authors.xsl Loading commit data...
autogen.sh Loading commit data...
config.h.win32 Loading commit data...
configure.ac Loading commit data...
gimp-zip.in Loading commit data...
gimp.doap Loading commit data...
gimp.pc.in Loading commit data...
gimpthumb.pc.in Loading commit data...
gimpui.pc.in Loading commit data...