[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: [Panel-devel] Patch to cache standard applet background
From:       Zack Rusin <zack () kde ! org>
Date:       2007-07-29 19:31:38
Message-ID: 200707291531.39272.zack () kde ! org
[Download RAW message or body]

On Sunday 29 July 2007 12:24:11 pm Thomas Georgiou wrote:
> I reworked the background caching without the shadows and made big
> improvements to it thanks to the help of people on this mailing list.

cool, just some small comments.

+        if (cachedBackground || cachedBackground->size() != QSize(leftWidth + \
contentWidth + rightWidth, topHeight + contentHeight + bottomHeight)) {

I don't think this part works.
if (pointerIsValid || invalidPointer->size() != QSize(...))
> )
I guess cachedBackground is always valid.

+            if (!cachedBackground) {
+                delete cachedBackground;
+            }

the "if" part is redundant. delete cachedBackground by itself is ok.

+        p2->drawPixmap(leftOffset, topOffset, *cachedBackground);

this part works by accident (if at all :) ). you open a painter on a pixmap,
render to it and then try to use the pixmap without ending the painter. 
that means the pixmap is in an undefined state when you use it. remember
that you must add a p.end(); call in the section where you render to
cachedBackground.
 
z
_______________________________________________
Panel-devel mailing list
Panel-devel@kde.org
https://mail.kde.org/mailman/listinfo/panel-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic