Implement XRender shadow brightness.

svn path=/trunk/KDE/kdebase/workspace/; revision=889724
This commit is contained in:
Lucas Murray 2008-11-27 13:20:26 +00:00
parent 08b2d13fdc
commit e4d54bd4de

View file

@ -642,6 +642,13 @@ void ShadowEffect::drawShadowQuadXRender( XRenderPicture *picture, QRect rect, f
XRenderComposite( display(), PictOpOver, *picture, fill, effects->xrenderBufferPicture(), 0, 0, 0, 0, XRenderComposite( display(), PictOpOver, *picture, fill, effects->xrenderBufferPicture(), 0, 0, 0, 0,
rect.x(), rect.y(), rect.width(), rect.height() ); rect.x(), rect.y(), rect.width(), rect.height() );
// Fake brightness by overlaying black
// Cannot use XRenderFillRectangle() due to ARGB
XRenderColor col = { 0, 0, 0, 0xffff * ( 1 - brightness ) * opacity };
fill = xRenderFill( &col );
XRenderComposite( display(), PictOpOver, fill, *picture, effects->xrenderBufferPicture(), 0, 0, 0, 0,
rect.x(), rect.y(), rect.width(), rect.height() );
// Return to scale to 1.0 // Return to scale to 1.0
if( xScale != 1.0 || yScale != 1.0 ) if( xScale != 1.0 || yScale != 1.0 )
{ {