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 | |
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')
-rw-r--r-- | canvas/source/cairo/cairo_canvasbitmap.hxx | 2 | ||||
-rw-r--r-- | canvas/source/vcl/canvasbitmap.hxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/canvas/source/cairo/cairo_canvasbitmap.hxx b/canvas/source/cairo/cairo_canvasbitmap.hxx index 72a22ca0cfe3..a4e55f7b642a 100644 --- a/canvas/source/cairo/cairo_canvasbitmap.hxx +++ b/canvas/source/cairo/cairo_canvasbitmap.hxx @@ -108,7 +108,7 @@ namespace cairocanvas // 2 ... FIXME: leftover? ever called with this? always returns nothing (empty Any) // 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 {} 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 {} |