diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-11-01 16:27:17 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-11-01 18:07:47 +0100 |
commit | 3c77541ec0ba2c9f209c67da272f57093092ebdb (patch) | |
tree | 706111b197101816b2a32266b91306167090cdb0 /canvas/source/vcl | |
parent | fabaabbd01c84cbdea465382e42387a452b54046 (diff) |
Transport Pixmap from GetNativeSurfaceHandle via css::uno::Any as sal_Int64
The values returned from GetNativeSurfaceHandle are only used in
cairocanvas::CanvasBitmap::getFastPropertyValue
(canvas/source/cairo/cairo_canvasbitmap.cxx), whose consumers in turn are (at
least the ones I could identify):
* OGLTransitionerImpl::setSlides
(slideshow/source/engine/opengl/TransitionerImpl.cxx), passing the
values on to X11SalObject::SetLeaveEnterBackgrounds, which extracts the
Pixmap value to pass it on to XSetWindowBackgroundPixmap.
* X11SalBitmap::Create (vcl/unx/generic/gdi/salbmp.cxx), which extracts the
Pixmap value to pass it on to X11SalBitmap::ImplCreateFromDrawable (as a
Drawable) and to XFreePixmap.
While Pixmap XIDs are apparently 32-bit in the X11 protocol, see e.g.
<https://www.x.org/releases/X11R7.7/doc/xproto/x11protocol.html>, Xlib and the
underlying /usr/include/X11/Xdefs.h appear to be somewhat confused whether the
typedef for XID should be unsigned long (presumably stemming from times when
long was universally 32-bit) or CARD32, see e.g. <https://gitlab.freedesktop.org
/xorg/proto/xorgproto/-/blob/master/include/X11/Xdefs.h>. So conservatively
stick to a 64-bit type here, even if it should only ever contain 32-bit values.
Change-Id: I26c3a2ff74cef092042a6e3648cd9a6f4a9e3aac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105144
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'canvas/source/vcl')
-rw-r--r-- | canvas/source/vcl/canvasbitmap.hxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/canvas/source/vcl/canvasbitmap.hxx b/canvas/source/vcl/canvasbitmap.hxx index 7eea1ac31383..1a95ce8c632c 100644 --- a/canvas/source/vcl/canvasbitmap.hxx +++ b/canvas/source/vcl/canvasbitmap.hxx @@ -101,7 +101,7 @@ namespace vclcanvas // 2 ... get X pixmap handle to alpha mask // returned any contains either BitmapEx pointer or array of three Any value // 1st a bool value: true - free the pixmap after used by XFreePixmap, false do nothing, the pixmap is used internally in the canvas - // 2nd the pixmap handle + // 2nd the pixmap handle (sal_Int64) // 3rd the pixmap depth virtual css::uno::Any SAL_CALL getFastPropertyValue(sal_Int32 nHandle) override; virtual void SAL_CALL setFastPropertyValue(sal_Int32, const css::uno::Any&) override {} |