combining Render's Composite + SHM's PutImage

Nigel Tao nigeltao at golang.org
Fri Apr 10 05:23:16 PDT 2015


OK, I'm making some progress, but I'm still a little stuck...

One thing is that my SHM CreatePixmap call seems to fail on one
computer, with a Bad Implementation (17) error, but work on the other.
The former has nVidia graphics, the latter has Intel. I wouldn't rule
out my making a stupid copy/paste error, but would the different
hardware and/or driver explain why one fails and the other works? If
the hardware fundamentally won't let me make a SHM Pixmap, I'm going
to have to copy (SHM PutImage) to an intermediate pixmap to
alpha-blend, right?

Even where SHM CreatePixmap works, I can only seem to create a
depth-24 pixmap, which defeats the purpose of alpha-blending if the
shared-memory image's alpha channel is implicitly fully opaque. If I
try to create a depth-32 pixmap, I get a Bad Match (8) error. I
noticed that the Screen's RootVisual (0x20, see xdpyinfo snippet
below) that I passed to CreateWindow corresponded to a depth-24
VisualInfo, so I tried passing different VisualInfos to CreateWindow
(either 0x21 or 0x60), but got another Bad Match (8) error from
CreateWindow.

I'm happy to flounder around some more on my own, but any leads would
be appreciated.

xdpyinfo snippet:

screen #0:
  dimensions:    1680x1050 pixels (444x277 millimeters)
  resolution:    96x96 dots per inch
  depths (7):    24, 1, 4, 8, 15, 16, 32
  root window id:    0x93
  depth of root window:    24 planes
  number of colormaps:    minimum 1, maximum 1
  default colormap:    0x22
  default number of colormap cells:    256
  preallocated pixels:    black 0, white 16777215
  options:    backing-store WHEN MAPPED, save-unders NO
  largest cursor:    64x64
  current input event mask:    0x5a004c
    ButtonPressMask          ButtonReleaseMask        PointerMotionMask
    StructureNotifyMask      SubstructureNotifyMask   SubstructureRedirectMask
    PropertyChangeMask
  number of visuals:    16
  default visual id:  0x20
  visual:
    visual id:    0x20
    class:    TrueColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x21
    class:    DirectColor
    depth:    24 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits
[snip]
  visual:
    visual id:    0x60
    class:    TrueColor
    depth:    32 planes
    available colormap entries:    256 per subfield
    red, green, blue masks:    0xff0000, 0xff00, 0xff
    significant bits in color specification:    8 bits


More information about the xorg mailing list