mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-04-25 19:00:42 +02:00
cairo_xlib_surface_create_similar: Pass the original drawable to XCreatePixmap
Previously we were passing the root window of the same screen. Letting the X server know the actual Drawable for which we're trying to be similar allows the X server to be more efficient.
This commit is contained in:
parent
cb9f9086a1
commit
ac743e25fa
1 changed files with 2 additions and 2 deletions
|
|
@ -168,7 +168,7 @@ _cairo_xlib_surface_create_similar_with_format (void *abstract_src,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
pix = XCreatePixmap (dpy, RootWindowOfScreen (src->screen),
|
||||
pix = XCreatePixmap (dpy, src->drawable,
|
||||
width <= 0 ? 1 : width, height <= 0 ? 1 : height,
|
||||
depth);
|
||||
|
||||
|
|
@ -246,7 +246,7 @@ _cairo_xlib_surface_create_similar (void *abstract_src,
|
|||
/* We've got a compatible XRenderFormat now, which means the
|
||||
* similar surface will match the existing surface as closely in
|
||||
* visual/depth etc. as possible. */
|
||||
pix = XCreatePixmap (src->dpy, RootWindowOfScreen (src->screen),
|
||||
pix = XCreatePixmap (src->dpy, src->drawable,
|
||||
width <= 0 ? 1 : width, height <= 0 ? 1 : height,
|
||||
xrender_format->depth);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue