Add pref to control CanOptimizeToImageLayer for large downscale factors.

This resolves #626
This commit is contained in:
wolfbeast 2018-07-14 07:45:06 +02:00 committed by Roy Tam
commit ca5c2ba100
3 changed files with 12 additions and 0 deletions

View file

@ -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);