> On Sept. 16, 2013, 12:16 p.m., Fredrik Höglund wrote:
> > tier1/kwindowsystem/src/kxutils_p.h, line 49
> > <http://git.reviewboard.kde.org/r/112755/diff/1/?file=189772#file189772line49>
> >
> >     This statement is no longer true. If the pixmap is not an ARGB32 
> > pixmap, the function will crash. It will also fail if the image byte order 
> > doesn't match the CPU byte order, if the mask has the wrong size, or the 
> > mask isn't a bitmap.
> >
> 
> Martin Gräßlin wrote:
>     I added some further checks to handle these problems except for byte 
> order. I'm lacking ideas on how to do it and even more on how to test it.

I think the logic needs to be the following:

* If the depth is 32, assume that the format is ARGB32_Premultiplied.
* If the depth is the default depth, examine the red/green/blue masks in the 
default visual
  and try to find a matching QImage format. If there is no matching format, 
it's necessary
  to do format conversion. x2rgb10 in particular is becoming increasingly 
likely,
  and it's not supported by Qt.
* If the depth is not 32, the default depth, or 1, we simply don't know.

The byte order is found in xcb_setup_t::image_byte_order.


- Fredrik


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/112755/#review40111
-----------------------------------------------------------


On Sept. 17, 2013, 5:42 a.m., Martin Gräßlin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112755/
> -----------------------------------------------------------
> 
> (Updated Sept. 17, 2013, 5:42 a.m.)
> 
> 
> Review request for KDE Frameworks.
> 
> 
> Description
> -------
> 
> Implements the createPixmapFromHandle by getting the image for the pixmaps 
> and using it as either the Pixmap or the bitmap mask.
> 
> 
> Diffs
> -----
> 
>   tier1/kwindowsystem/src/kxutils.cpp 33bd678 
>   tier1/kwindowsystem/src/kxutils_p.h 84d639b 
> 
> Diff: http://git.reviewboard.kde.org/r/112755/diff/
> 
> 
> Testing
> -------
> 
> Adjusted KWin to take this codepath and say thanks to Iceweasel for having a 
> mask
> 
> 
> Thanks,
> 
> Martin Gräßlin
> 
>

_______________________________________________
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel

Reply via email to