[Marble-commits] branches/KDE/4.4/kdeedu/marble/src/lib
Torsten Rahn
tackat at kde.org
Sat Jan 30 10:12:41 CET 2010
SVN commit 1082258 by rahn:
Backport of
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
--- branches/KDE/4.4/kdeedu/marble/src/lib/MarbleMap.cpp #1082257:1082258
@@ -135,15 +135,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 ));
--- branches/KDE/4.4/kdeedu/marble/src/lib/MarbleWidget.cpp #1082257:1082258
@@ -847,8 +847,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