kick trilinear filtering if favor of the lanczos filter (now default, unless blacklisted)
make the scale method configurable and align the UI for GL and Xrender CCBUG: 243181 svn path=/trunk/KDE/kdebase/workspace/; revision=1195698
This commit is contained in:
parent
24a0e94397
commit
029f93127f
6 changed files with 253 additions and 221 deletions
|
@ -117,14 +117,16 @@ KWinCompositingConfig::KWinCompositingConfig(QWidget *parent, const QVariantList
|
|||
connect(ui.animationSpeedCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
||||
|
||||
connect(ui.compositingType, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
||||
connect(ui.compositingType, SIGNAL(currentIndexChanged(int)), this, SLOT(toogleSmoothScaleUi(int)));
|
||||
connect(ui.windowThumbnails, SIGNAL(activated(int)), this, SLOT(changed()));
|
||||
connect(ui.disableChecks, SIGNAL(toggled(bool)), this, SLOT(changed()));
|
||||
connect(ui.unredirectFullscreen , SIGNAL(toggled(bool)), this, SLOT(changed()));
|
||||
connect(ui.glScaleFilter, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
||||
connect(ui.xrScaleFilter, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
||||
|
||||
connect(ui.glMode, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
||||
connect(ui.glTextureFilter, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
||||
connect(ui.glDirect, SIGNAL(toggled(bool)), this, SLOT(changed()));
|
||||
connect(ui.glVSync, SIGNAL(toggled(bool)), this, SLOT(changed()));
|
||||
connect(ui.xrenderSmoothScale, SIGNAL(toggled(bool)), this, SLOT(changed()));
|
||||
connect(ui.compositingStateButton, SIGNAL(clicked(bool)), kwinInterface, SLOT(toggleCompositing()));
|
||||
connect(kwinInterface, SIGNAL(compositingToggled(bool)), this, SLOT(setupCompositingState(bool)));
|
||||
|
||||
|
@ -415,6 +417,13 @@ void KWinCompositingConfig::setupCompositingState( bool active, bool enabled )
|
|||
ui.compositingStateButton->setEnabled( enabled );
|
||||
}
|
||||
|
||||
void KWinCompositingConfig::toogleSmoothScaleUi( int compositingType )
|
||||
{
|
||||
ui.glScaleFilter->setVisible( compositingType == OPENGL_INDEX );
|
||||
ui.xrScaleFilter->setVisible( compositingType == XRENDER_INDEX );
|
||||
ui.scaleMethodLabel->setBuddy( compositingType == XRENDER_INDEX ? ui.xrScaleFilter : ui.glScaleFilter );
|
||||
}
|
||||
|
||||
bool KWinCompositingConfig::effectEnabled( const QString& effect, const KConfigGroup& cfg ) const
|
||||
{
|
||||
KService::List services = KServiceTypeTrader::self()->query(
|
||||
|
@ -446,13 +455,15 @@ void KWinCompositingConfig::loadAdvancedTab()
|
|||
ui.disableChecks->setChecked( config.readEntry( "DisableChecks", false ));
|
||||
ui.unredirectFullscreen->setChecked( config.readEntry( "UnredirectFullscreen", true ));
|
||||
|
||||
ui.xrScaleFilter->setCurrentIndex((int)config.readEntry("XRenderSmoothScale", false));
|
||||
ui.glScaleFilter->setCurrentIndex(config.readEntry("GLTextureFilter", 2));
|
||||
|
||||
QString glMode = config.readEntry("GLMode", "TFP");
|
||||
ui.glMode->setCurrentIndex((glMode == "TFP") ? 0 : ((glMode == "SHM") ? 1 : 2));
|
||||
ui.glTextureFilter->setCurrentIndex(config.readEntry("GLTextureFilter", 1));
|
||||
ui.glDirect->setChecked(config.readEntry("GLDirect", mDefaultPrefs.enableDirectRendering()));
|
||||
ui.glVSync->setChecked(config.readEntry("GLVSync", mDefaultPrefs.enableVSync()));
|
||||
|
||||
ui.xrenderSmoothScale->setChecked(config.readEntry("XRenderSmoothScale", false));
|
||||
toogleSmoothScaleUi( ui.compositingType->currentIndex() );
|
||||
}
|
||||
|
||||
void KWinCompositingConfig::load()
|
||||
|
@ -603,7 +614,8 @@ bool KWinCompositingConfig::saveAdvancedTab()
|
|||
advancedChanged = true;
|
||||
}
|
||||
else if( config.readEntry("HiddenPreviews", 5) != hps[ ui.windowThumbnails->currentIndex() ]
|
||||
|| config.readEntry("XRenderSmoothScale", false ) != ui.xrenderSmoothScale->isChecked() )
|
||||
|| (int)config.readEntry("XRenderSmoothScale", false ) != ui.xrScaleFilter->currentIndex()
|
||||
|| config.readEntry("GLTextureFilter", 2 ) != ui.glScaleFilter->currentIndex())
|
||||
advancedChanged = true;
|
||||
|
||||
config.writeEntry("Backend", (ui.compositingType->currentIndex() == OPENGL_INDEX) ? "OpenGL" : "XRender");
|
||||
|
@ -611,12 +623,13 @@ bool KWinCompositingConfig::saveAdvancedTab()
|
|||
config.writeEntry("DisableChecks", ui.disableChecks->isChecked());
|
||||
config.writeEntry( "UnredirectFullscreen", ui.unredirectFullscreen->isChecked() );
|
||||
|
||||
config.writeEntry("XRenderSmoothScale", ui.xrScaleFilter->currentIndex() == 1);
|
||||
config.writeEntry("GLTextureFilter", ui.glScaleFilter->currentIndex());
|
||||
|
||||
config.writeEntry("GLMode", glModes[ui.glMode->currentIndex()]);
|
||||
config.writeEntry("GLTextureFilter", ui.glTextureFilter->currentIndex());
|
||||
config.writeEntry("GLDirect", ui.glDirect->isChecked());
|
||||
config.writeEntry("GLVSync", ui.glVSync->isChecked());
|
||||
|
||||
config.writeEntry("XRenderSmoothScale", ui.xrenderSmoothScale->isChecked());
|
||||
|
||||
return advancedChanged;
|
||||
}
|
||||
|
@ -756,11 +769,11 @@ void KWinCompositingConfig::defaults()
|
|||
ui.windowThumbnails->setCurrentIndex( 1 );
|
||||
ui.disableChecks->setChecked( false );
|
||||
ui.unredirectFullscreen->setChecked( true );
|
||||
ui.xrScaleFilter->setCurrentIndex( 0 );
|
||||
ui.glScaleFilter->setCurrentIndex( 2 );
|
||||
ui.glMode->setCurrentIndex( 0 );
|
||||
ui.glTextureFilter->setCurrentIndex( 1 );
|
||||
ui.glDirect->setChecked( mDefaultPrefs.enableDirectRendering() );
|
||||
ui.glVSync->setChecked( mDefaultPrefs.enableVSync() );
|
||||
ui.xrenderSmoothScale->setChecked( false );
|
||||
}
|
||||
|
||||
QString KWinCompositingConfig::quickHelp() const
|
||||
|
|
|
@ -76,6 +76,9 @@ class KWinCompositingConfig : public KCModule
|
|||
void initEffectSelector();
|
||||
void setupCompositingState( bool active, bool enabled = true );
|
||||
|
||||
private slots:
|
||||
void toogleSmoothScaleUi( int compositingType );
|
||||
|
||||
private:
|
||||
bool effectEnabled( const QString& effect, const KConfigGroup& cfg ) const;
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>728</width>
|
||||
<height>554</height>
|
||||
<width>595</width>
|
||||
<height>483</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout">
|
||||
|
@ -125,19 +125,6 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Effect for desktop switching:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>desktopSwitchingCombo</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="KComboBox" name="desktopSwitchingCombo">
|
||||
<property name="sizePolicy">
|
||||
|
@ -320,112 +307,227 @@
|
|||
<attribute name="title">
|
||||
<string>Advanced</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_5">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Compositing type:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>compositingType</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="KComboBox" name="compositingType">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>3</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>OpenGL</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>XRender</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="disableChecks">
|
||||
<property name="text">
|
||||
<string>Disable functionality checks</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="title">
|
||||
<string>General Options</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Compositing type:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>compositingType</cstring>
|
||||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Keep window thumbnails:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>windowThumbnails</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="KComboBox" name="windowThumbnails">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>3</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Always (Breaks minimization)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Only for Shown Windows</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Never</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="scaleMethodLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Scale method:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>xrScaleFilter</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QComboBox" name="xrScaleFilter">
|
||||
<property name="toolTip">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Segoe'; font-size:8pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Crisp:</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">XRenderSetPictureFilter(&quot;fast&quot;)</span> - Pretty fast on all GPUs but looks bricky</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Smooth:</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">XRenderSetPictureFilter(&quot;good&quot;) </span>- linear blending.</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Fast enough on newer nvidia GPUs and maybe others but also can be <span style=" text-decoration: underline;">very</span> slow, you'll have to try.</p></body></html></string>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Crisp</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Smooth (slower)</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="glScaleFilter">
|
||||
<property name="toolTip">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Segoe'; font-size:8pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Crisp:</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">GL_NEAREST</span> - (very) fast on all GPUs but looks bricky</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Smooth:</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">GL_LINEAR</span> - fast on most GPUs but a little blurry</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Accurate:</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Lanczos filter, requires shader support (glsl or arb).</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Might be slow on weaker GPUs and even cause various troubles with broken drivers. (From overbrightning to segfaults)</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Fall back to &quot;Smooth&quot; if you've problems</p></body></html></string>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Crisp</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Smooth</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Accurate</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="unredirectFullscreen">
|
||||
<property name="text">
|
||||
<string>Suspend desktop effects for fullscreen windows</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="KComboBox" name="compositingType">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>OpenGL</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>XRender</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Keep window thumbnails:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>windowThumbnails</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="KComboBox" name="windowThumbnails">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Always (Breaks minimization)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Only for Shown Windows</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Never</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="disableChecks">
|
||||
<property name="whatsThis">
|
||||
<string>Enabling this option allows compositing to be activated even if some of the internal checks fail. Doing so may make the whole desktop unusable and its use is not recommened. Use only if KWin refuses to activate compositing on a system that should be capable of compositing.
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Disable functionality checks</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="glGroup">
|
||||
<property name="title">
|
||||
<string>OpenGL Options</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_5">
|
||||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
|
@ -444,7 +546,7 @@
|
|||
<widget class="KComboBox" name="glMode">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>1</horstretch>
|
||||
<horstretch>3</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
|
@ -465,51 +567,7 @@
|
|||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Texture filter:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>glTextureFilter</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="KComboBox" name="glTextureFilter">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Nearest (fastest)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Bilinear</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Trilinear (best quality)</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="glDirect">
|
||||
<property name="text">
|
||||
<string>Enable direct rendering</string>
|
||||
|
@ -519,7 +577,7 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="glVSync">
|
||||
<property name="text">
|
||||
<string>Use VSync</string>
|
||||
|
@ -532,45 +590,19 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="xrenderGroup">
|
||||
<property name="title">
|
||||
<string>XRender Options</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_6">
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="xrenderSmoothScale">
|
||||
<property name="text">
|
||||
<string>Smooth scaling (slower)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" colspan="2">
|
||||
<spacer name="verticalSpacer_6">
|
||||
<item>
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>0</height>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="unredirectFullscreen">
|
||||
<property name="toolTip">
|
||||
<string>Improves performance of fullscreen applications like games and video players. This option can cause flickering when another window is opened above the fullscreen window.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Suspend desktop effects for fullscreen windows</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
|
|
|
@ -40,7 +40,7 @@ LanczosFilter::LanczosFilter( QObject* parent )
|
|||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
||||
, m_offscreenTex( 0 )
|
||||
, m_offscreenTarget( 0 )
|
||||
, m_shader( new LanczosShader( this ) )
|
||||
, m_shader( 0 )
|
||||
#endif
|
||||
, m_inited( false)
|
||||
{
|
||||
|
@ -60,8 +60,13 @@ void LanczosFilter::init()
|
|||
return;
|
||||
m_inited = true;
|
||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
||||
// check the blacklist
|
||||
|
||||
KSharedConfigPtr config = KSharedConfig::openConfig( "kwinrc" );
|
||||
|
||||
if ( config->group( "Compositing" ).readEntry( "GLTextureFilter", 2 ) != 2 )
|
||||
return; // disabled by config
|
||||
|
||||
// check the blacklist
|
||||
KConfigGroup blacklist = config->group( "Blacklist" ).group( "Lanczos" );
|
||||
if( effects->checkDriverBlacklist( blacklist ) )
|
||||
{
|
||||
|
@ -69,6 +74,7 @@ void LanczosFilter::init()
|
|||
return;
|
||||
}
|
||||
|
||||
m_shader = new LanczosShader( this );
|
||||
if( !m_shader->init() )
|
||||
{
|
||||
delete m_shader;
|
||||
|
|
|
@ -265,7 +265,7 @@ void Options::reloadCompositingSettings()
|
|||
glMode = GLFallback;
|
||||
glDirect = config.readEntry("GLDirect", prefs.enableDirectRendering() );
|
||||
glVSync = config.readEntry("GLVSync", prefs.enableVSync() );
|
||||
glSmoothScale = qBound( -1, config.readEntry( "GLTextureFilter", -1 ), 2 );
|
||||
glSmoothScale = qBound( -1, config.readEntry( "GLTextureFilter", 2 ), 2 );
|
||||
glStrictBinding = config.readEntry( "GLStrictBinding", prefs.strictBinding());
|
||||
|
||||
xrenderSmoothScale = config.readEntry("XRenderSmoothScale", false );
|
||||
|
|
|
@ -1427,18 +1427,7 @@ void SceneOpenGL::Window::performPaint( int mask, QRegion region, WindowPaintDat
|
|||
else
|
||||
filter = ImageFilterFast;
|
||||
if( filter == ImageFilterGood )
|
||||
{
|
||||
// avoid unneeded mipmap generation by only using trilinear
|
||||
// filtering when it actually makes a difference, that is with
|
||||
// minification or changed vertices
|
||||
if( options->glSmoothScale == 2
|
||||
&& ( data.quads.smoothNeeded() || data.xScale < 1 || data.yScale < 1 ))
|
||||
{
|
||||
texture.setFilter( GL_LINEAR_MIPMAP_LINEAR );
|
||||
}
|
||||
else
|
||||
texture.setFilter( GL_LINEAR );
|
||||
}
|
||||
texture.setFilter( GL_LINEAR );
|
||||
else
|
||||
texture.setFilter( GL_NEAREST );
|
||||
// do required transformations
|
||||
|
@ -1604,18 +1593,7 @@ void SceneOpenGL::Window::paintDecoration( const QPixmap* decoration, TextureTyp
|
|||
else
|
||||
return;
|
||||
if( filter == ImageFilterGood )
|
||||
{
|
||||
// avoid unneeded mipmap generation by only using trilinear
|
||||
// filtering when it actually makes a difference, that is with
|
||||
// minification or changed vertices
|
||||
if( options->glSmoothScale == 2
|
||||
&& ( data.quads.smoothNeeded() || data.xScale < 1 || data.yScale < 1 ))
|
||||
{
|
||||
decorationTexture->setFilter( GL_LINEAR_MIPMAP_LINEAR );
|
||||
}
|
||||
else
|
||||
decorationTexture->setFilter( GL_LINEAR );
|
||||
}
|
||||
decorationTexture->setFilter( GL_LINEAR );
|
||||
else
|
||||
decorationTexture->setFilter( GL_NEAREST );
|
||||
decorationTexture->setWrapMode( GL_CLAMP_TO_EDGE );
|
||||
|
|
Loading…
Reference in a new issue