diff options
| author | Uli Schlachter <psychon@znc.in> | 2017-06-26 09:10:28 +0000 |
|---|---|---|
| committer | Uli Schlachter <psychon@znc.in> | 2017-07-01 09:09:53 +0000 |
| commit | ae3562c58dbfc2c4b002a67828639ffc91e83749 (patch) | |
| tree | de9b24650bb1ec99ae86413cf219f02794732ff8 /src/io/resource.cpp | |
| parent | Fix a small memory leak in SPCanvas::paint (diff) | |
| download | inkscape-ae3562c58dbfc2c4b002a67828639ffc91e83749.tar.gz inkscape-ae3562c58dbfc2c4b002a67828639ffc91e83749.zip | |
SPCanvas: Use a similar image for _backing_store
Cairo 1.12 adds the function cairo_surface_create_similar_image(). It
works just like cairo_image_surface_create() in that it creates an image
surface. However, when the passed-in surface is a cairo-xlib surface,
the data of the image surface will be allocated in a shared memory
segment. This makes it cheaper to have the X11 server access the surface
since it does not need to be uploaded.
To make use of this, a new _surface_for_similar member is added. This
member is set to a (useless) surface in handle_draw(). On Linux this
creates a cairo-xlib surface, so that _backing_store is latter allocated
in a shared memory segment.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Diffstat (limited to 'src/io/resource.cpp')
0 files changed, 0 insertions, 0 deletions
