Skip to content
Snippets Groups Projects
Commit 50456675 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

datatransferimage: improve memory usage

+ Reduce listview caching' size by 50%
+ use sourceSize to compress images and speedup loading
+ use autoTransform: true to rotate images when needed

Change-Id: Idf1babdc73f43aa6a79b89428c25c5d06856c0ef
GitLab: #649
parent 0477376a
No related branches found
No related tags found
No related merge requests found
......@@ -255,9 +255,13 @@ Loader {
asynchronous: true
width: sourceComponent.width
height: sourceComponent.height
sourceComponent: mediaInfo.isImage !== undefined ?
imageComp : mediaInfo.isAnimatedImage !== undefined ? animatedImageComp :
avComp
sourceComponent: {
if (mediaInfo.isImage)
return imageComp
if (mediaInfo.isAnimatedImage)
return animatedImageComp
return avComp
}
Component {
id: avComp
WebEngineView {
......@@ -316,7 +320,7 @@ Loader {
fillMode: Image.PreserveAspectCrop
mipmap: true
antialiasing: true
autoTransform: false
autoTransform: true
asynchronous: true
source: "file:///" + Body
property real aspectRatio: implicitWidth / implicitHeight
......@@ -361,8 +365,10 @@ Loader {
fillMode: Image.PreserveAspectCrop
mipmap: true
antialiasing: true
autoTransform: false
autoTransform: true
asynchronous: true
sourceSize.width: width
sourceSize.height: height
source: "file:///" + Body
property real aspectRatio: implicitWidth / implicitHeight
property real adjustedWidth: Math.min(maxSize,
......
......@@ -174,8 +174,8 @@ JamiListView {
width: parent.width
// this offscreen caching is pretty huge
// displayMarginEnd may be removed
displayMarginBeginning: 4096
displayMarginEnd: 4096
displayMarginBeginning: 2048
displayMarginEnd: 2048
maximumFlickVelocity: 2048
verticalLayoutDirection: ListView.BottomToTop
boundsBehavior: Flickable.StopAtBounds
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment