Search
SailfishOS Open Build Service
>
Projects
>
home:siteshwar
:
branches:nemo:devel:mw
>
xulrunner-qt5
> _service:tar_git:0007-Don-t-decode-all-images-on-shell-activation-if-decod.patch
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File _service:tar_git:0007-Don-t-decode-all-images-on-shell-activation-if-decod.patch of Package xulrunner-qt5
From 99e5da5d69b1dfbd8ae728e8dd40af416c59d094 Mon Sep 17 00:00:00 2001 From: Piotr Tworek <piotr.tworek@jollamobile.com> Date: Fri, 3 Jul 2015 14:12:32 +0200 Subject: [PATCH 07/15] Don't decode all images on shell activation if decodeondraw is enabled. Fixes JB#25287 Currently if the page contains a lot images in nsDocument::mImageTracker they will be all decoded when nsDocument::SetImageLockingState(true). This seems to be an unwanted behaviour when image.mem.decodeondraw pref is enabled. In such case the images should be decoded just before being painted. Since some of the images may not be even visible, we don't want to waste memory for the decoded data. The original fix for the problem disabled image locking completely. Unfortunately this cused regressions on pages like jolla.com/tablet (see JB#30305). Signed-off-by: Raine Makelainen <raine.makelainen@jolla.com> --- dom/base/nsDocument.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dom/base/nsDocument.cpp b/dom/base/nsDocument.cpp index 47f611e..c45d949 100644 --- a/dom/base/nsDocument.cpp +++ b/dom/base/nsDocument.cpp @@ -10580,7 +10580,9 @@ PLDHashOperator LockEnumerator(imgIRequest* aKey, void* userArg) { aKey->LockImage(); - aKey->RequestDecode(); + if (!Preferences::GetBool("image.mem.decodeondraw", false)) { + aKey->RequestDecode(); + } return PL_DHASH_NEXT; } -- 2.1.4