From fd0df31c9e8a5ab9413a8aeff4c8c9f28e07b09f Mon Sep 17 00:00:00 2001 From: Rivo Laks Date: Thu, 6 Sep 2007 15:10:03 +0000 Subject: [PATCH] Draw the lines on top of the graph in XRender mode svn path=/trunk/KDE/kdebase/workspace/; revision=709102 --- effects/showfps.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/effects/showfps.cpp b/effects/showfps.cpp index 98412a65c5..1dc74f2c1c 100644 --- a/effects/showfps.cpp +++ b/effects/showfps.cpp @@ -304,11 +304,6 @@ void ShowFpsEffect::paintGraph( int x, int y, QList values, QList line col.red = col.green = col.blue = int( alpha * 0xffff ); // white XRenderFillRectangle( display(), PictOpSrc, p, &col, 0, 0, values.count(), MAX_TIME ); - // Then the lines - col.red = col.green = col.blue = 0; // black - foreach( int h, lines) - XRenderFillRectangle( display(), PictOpSrc, p, &col, 0, MAX_TIME - h, values.count(), 1 ); - // Then the values col.red = col.green = col.blue = int( alpha * 0x8000 ); // grey for( int i = 0; i < values.count(); i++ ) @@ -344,6 +339,13 @@ void ShowFpsEffect::paintGraph( int x, int y, QList values, QList line XRenderFillRectangle( display(), PictOpSrc, p, &col, values.count() - i, MAX_TIME - value, 1, value ); } + + // Then the lines + col.red = col.green = col.blue = 0; // black + foreach( int h, lines) + XRenderFillRectangle( display(), PictOpSrc, p, &col, 0, MAX_TIME - h, values.count(), 1 ); + + // Finally render the pixmap onto screen XRenderComposite( display(), alpha != 1.0 ? PictOpOver : PictOpSrc, p, None, effects->xrenderBufferPicture(), 0, 0, 0, 0, x, y, values.count(), MAX_TIME ); XRenderFreePicture( display(), p );