Many many fixes and optimizations. Texture scaling now dramatically improve performances, various shader optimizations, improved static noise and horizontal distortion and more... #184

Merged
Swordfish90 merged 25 commits from refactoring into master 2014-12-14 21:27:41 +01:00
2 changed files with 9 additions and 22 deletions
Showing only changes of commit dcb332b06f - Show all commits

View File

@ -28,10 +28,10 @@ Item{
id: terminalContainer id: terminalContainer
//Frame displacement properties. This makes the terminal the same size of the texture. //Frame displacement properties. This makes the terminal the same size of the texture.
property real dtop: frame.item.displacementTop property real dtop: frame.item.displacementTop * shadersettings.window_scaling
property real dleft:frame.item.displacementLeft property real dleft:frame.item.displacementLeft * shadersettings.window_scaling
property real dright: frame.item.displacementRight property real dright: frame.item.displacementRight * shadersettings.window_scaling
property real dbottom: frame.item.displacementBottom property real dbottom: frame.item.displacementBottom * shadersettings.window_scaling
property alias title: ksession.title property alias title: ksession.title
@ -175,8 +175,8 @@ Item{
MouseArea{ MouseArea{
acceptedButtons: Qt.LeftButton | Qt.MiddleButton | Qt.RightButton acceptedButtons: Qt.LeftButton | Qt.MiddleButton | Qt.RightButton
// This is incredibly ugly. All this file should be reorganized. // This is incredibly ugly. All this file should be reorganized.
width: (parent.width + dleft + dright) / shadersettings.window_scaling - dleft -dright width: (parent.width + dleft + dright) - dleft -dright
height: (parent.height + dtop + dbottom) / shadersettings.window_scaling - dtop - dbottom height: (parent.height + dtop + dbottom) - dtop - dbottom
onWheel:{ onWheel:{
if(wheel.modifiers & Qt.ControlModifier){ if(wheel.modifiers & Qt.ControlModifier){
wheel.angleDelta.y > 0 ? zoomIn.trigger() : zoomOut.trigger(); wheel.angleDelta.y > 0 ? zoomIn.trigger() : zoomOut.trigger();

View File

@ -24,23 +24,10 @@ Item{
opacity: shadersettings.windowOpacity * 0.3 + 0.7 opacity: shadersettings.windowOpacity * 0.3 + 0.7
z: 1.9 z: 1.9
} }
}
// This is used to render the texture to a lower resolution then scale it up. transform: Scale {
Loader{ xScale: 1 / shadersettings.window_scaling
id: scalableContentSource yScale: 1 / shadersettings.window_scaling
active: shadersettings.window_scaling < 1
sourceComponent: ShaderEffectSource{
sourceItem: scalableContent
hideSource: true
smooth: true
}
}
Loader{
active: shadersettings.window_scaling < 1
anchors.fill: parent
sourceComponent: ShaderEffect{
property var source: scalableContentSource.item
} }
} }