[Marble-commits] KDE/kdeedu/marble/src/lib

Torsten Rahn tackat at kde.org
Sat Jan 30 10:08:47 CET 2010


SVN commit 1082256 by rahn:


- Fix black rectangle behind the big blue Marble
- Make stars reappear in the corners.



 M  +9 -2      MarbleMap.cpp  
 M  +6 -1      MarbleWidget.cpp  


--- trunk/KDE/kdeedu/marble/src/lib/MarbleMap.cpp #1082255:1082256
@@ -131,15 +131,22 @@
 {
     QSize size(m_parent->width(), m_parent->height());
     m_viewParams.viewport()->setSize( size );
+
+    // If the globe covers fully the screen then we can use the faster
+    // RGB32 as there are no translucent areas involved.
+    QImage::Format imageFormat = ( m_parent->mapCoversViewport() )
+                                 ? QImage::Format_RGB32
+                                 : QImage::Format_ARGB32_Premultiplied;
+
     // Recreate the canvas image with the new size.
     m_viewParams.setCanvasImage( new QImage( m_parent->width(), m_parent->height(),
-                                             QImage::Format_RGB32 ));
+                                             imageFormat ));
 
     if ( m_viewParams.showAtmosphere() ) {
         m_dirtyAtmosphere=true;
     }
 
-    // Recreate the 
+    // Recreate the coastline detection offscreen image
     m_viewParams.setCoastImage( new QImage( m_parent->width(), m_parent->height(),
                                             QImage::Format_RGB32 ));
 
--- trunk/KDE/kdeedu/marble/src/lib/MarbleWidget.cpp #1082255:1082256
@@ -788,8 +788,13 @@
     QImage image;
     if (!isEnabled())
     {
+        // If the globe covers fully the screen then we can use the faster
+        // RGB32 as there are no translucent areas involved.
+        QImage::Format imageFormat = ( map()->mapCoversViewport() )
+                                     ? QImage::Format_RGB32
+                                     : QImage::Format_ARGB32_Premultiplied;
         // Paint to an intermediate image
-        image = QImage(rect().size(), QImage::Format_ARGB32_Premultiplied);
+        image = QImage(rect().size(), imageFormat);
         paintDevice = ℑ
     }
 


More information about the Marble-commits mailing list