summaryrefslogtreecommitdiffstats
path: root/layout/base/nsDisplayList.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-07-14 07:45:06 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-07-14 07:45:06 +0200
commitdc9d933d81646b53edab245eb8f96b1e82ba752f (patch)
tree1ed71efd273183764ac549992dc3fc965a4c025f /layout/base/nsDisplayList.cpp
parent6bb3a908d34728fec0a3520eac03ad9b69dd4a9b (diff)
downloadUXP-dc9d933d81646b53edab245eb8f96b1e82ba752f.tar
UXP-dc9d933d81646b53edab245eb8f96b1e82ba752f.tar.gz
UXP-dc9d933d81646b53edab245eb8f96b1e82ba752f.tar.lz
UXP-dc9d933d81646b53edab245eb8f96b1e82ba752f.tar.xz
UXP-dc9d933d81646b53edab245eb8f96b1e82ba752f.zip
Add pref to control CanOptimizeToImageLayer for large downscale factors.
This resolves #626
Diffstat (limited to 'layout/base/nsDisplayList.cpp')
-rw-r--r--layout/base/nsDisplayList.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp
index 8035269e3..cb55bb2da 100644
--- a/layout/base/nsDisplayList.cpp
+++ b/layout/base/nsDisplayList.cpp
@@ -3513,6 +3513,11 @@ nsDisplayImageContainer::CanOptimizeToImageLayer(LayerManager* aManager,
return false;
}
+ if (gfxPrefs::ImageLayerizeAlways()) {
+ // If the user decides to trade off quality for performance, so be it!
+ return true;
+ }
+
const int32_t factor = mFrame->PresContext()->AppUnitsPerDevPixel();
const LayoutDeviceRect destRect =
LayoutDeviceRect::FromAppUnits(GetDestRect(), factor);