Menu

#17 pixmaps demo bad rendering

demos
open
nobody
None
5
2013-06-25
2006-02-03
No

Pixmaps rendering is bad. Not sure what is wrong.

Discussion

  • Robert P. Goldman

    Logged In: YES
    user_id=275595

    ACL7

     
  • Nobody/Anonymous

    Logged In: NO

    If this is due to a break like the following:

    Error in function XLIB:PUT-IMAGE:
    The bits-per-pixel of the image #<XLIB:IMAGE-Z
    32x32x24> does not match any server pixmap format.
    [Condition of type SIMPLE-ERROR]

    Restarts:
    0: [ABORT ] Discard pending X events, restart loop
    1: [DESTROY] Destroy the process

    Debug (type H for help)

    (XLIB:PUT-IMAGE #<XLIB:WINDOW :0 3600051>
    #<XLIB:GCONTEXT :0 56623183>
    #<XLIB:IMAGE-Z 32x32x24>
    :SRC-X ...)
    0]

    then this is a problem with servers where the depth differs from bits per pixel. Here's a patch that may fix it:

    *** garnet/src/opal/pixmaps.lisp Fri Nov 21 13:51:53 2003
    --- pixmaps.lisp Mon Aug 6 14:23:12 2007
    ***************
    *** 13,18 ****
    --- 13,20 ----

    ;;; CHANGE LOG:
    #|
    + 29-JUL-2007 Fred Gilham - Fix previous fix so it's really fixed (I hope).
    + (See CREATE-PIXMAP-IMAGE.)
    17-DEC-1999 Fred Gilham - Fix problem where pixmap format doesn't match valid
    pixmap formats in displays with different `depth' and
    `bits-per-pixel' values.
    ***************
    *** 292,298 ****
    ;; DZG (if (getf properties :x-hot)
    ;; DZG (xlib::index-decf (getf properties :x-hot) left-pad))
    (gem:create-image root-window width height depth T ; from data
    ! data properties #-(and) bits-per-pixel #+(and) nil
    left-pad data))))))

    --- 294,300 ----
    ;; DZG (if (getf properties :x-hot)
    ;; DZG (xlib::index-decf (getf properties :x-hot) left-pad))
    (gem:create-image root-window width height depth T ; from data
    ! data properties bits-per-pixel
    left-pad data))))))

    ***************
    *** 435,447 ****
    (defun create-pixmap-image (width height
    &optional color
    (window (g-value device-info :current-root)))
    ! (let ((depth (gem::x-window-depth window)))
    ! ;; Passing the display depth as the `bits-per-pixel' optional
    ! ;; parameter seems to avoid problems of displays where the depth
    ! ;; of the pixmap formats is different from the bits-per-pixel of
    ! ;; the pixmap formats, i.e. 24-bit depth but 32-bit
    ! ;; bits-per-pixel.
    ! (gem:create-image window width height depth NIL color NIL #-(and) depth)))

    ;;; Creates a pixmap image containing whatever is in the window.
    --- 437,448 ----
    (defun create-pixmap-image (width height
    &optional color
    (window (g-value device-info :current-root)))
    ! (let* ((depth (gem::x-window-depth window))
    ! ;; The depth and bits-per-pixel may not match --- i.e. a 24-bit depth but a 32-bit
    ! ;; bits-per-pixel. Some servers will complain if they can't find a matching
    ! ;; combination. So we get the actual bits-per-pixel and pass that to CREATE-IMAGE.
    ! (bits-per-pixel (gem::depth-to-bits-per-pixel depth)))
    ! (gem:create-image window width height depth NIL color NIL bits-per-pixel)))

    ;;; Creates a pixmap image containing whatever is in the window.

     
  • Fred Gilham

    Fred Gilham - 2013-06-25

    I've seen bad pixmap rendering from ACL for many years. I am not sure what's wrong with it. I have not seen any problems with any of the other lisps I test with (currently SBCL, CCL and CMUCL).