don't merge pixmaps when it's not required
authorFelix Domke <tmbinc@elitedvb.net>
Wed, 10 May 2006 23:20:47 +0000 (23:20 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Wed, 10 May 2006 23:20:47 +0000 (23:20 +0000)
lib/gui/ewidgetdesktop.cpp

index 9e09220..eaaa81c 100644 (file)
@@ -299,14 +299,17 @@ void eWidgetDesktop::makeCompatiblePixmap(gPixmap &pm)
                return;
        }
 
-       ePtr<gDC> pixmap_dc = new gDC(&pm);
-       gPainter pixmap_painter(pixmap_dc);
-       
        ePtr<gPixmap> target_pixmap;
        m_screen.m_dc->getPixmap(target_pixmap);
        
        assert(target_pixmap);
        
+       if (target_pixmap->surface && target_pixmap->surface->bpp > 8)
+               return;
+
+       ePtr<gDC> pixmap_dc = new gDC(&pm);
+       gPainter pixmap_painter(pixmap_dc);
+       
        pixmap_painter.mergePalette(target_pixmap);
 }