Closed Bug 1515237 Opened 7 years ago Closed 4 years ago

ClientTiledPaintedLayer::InvalidateRegion is slow on Android (because of low precision rendering)

Categories

(Core :: Graphics: Layers, enhancement, P3)

All
Android
enhancement

Tracking

()

RESOLVED WONTFIX
Tracking Status
firefox66 --- affected

People

(Reporter: mstange, Unassigned)

References

Details

(Keywords: perf, Whiteboard: [gfx-noted])

Profile: https://perfht.ml/2R2vLv4 In bug 1368386 I optimized ClientTiledPaintedLayer invalidation so that on platforms without low precision rendering, mInvalidRegion.GetRegion() would only be called once per paint. But we use low precision rendering on Android, so Android is currently missing that optimization: https://searchfox.org/mozilla-central/rev/13788edbabb04d004e4a1ceff41d4de68a8320a2/gfx/layers/client/ClientTiledPaintedLayer.h#60-61 > virtual void InvalidateRegion(const nsIntRegion& aRegion) override { > mInvalidRegion.Add(aRegion); > UpdateValidRegionAfterInvalidRegionChanged(); > if (!mLowPrecisionValidRegion.IsEmpty()) { > // Also update mLowPrecisionValidRegion. Unfortunately we call > // mInvalidRegion.GetRegion() here, which is expensive. > mLowPrecisionValidRegion.SubOut(mInvalidRegion.GetRegion()); > } > } The profile above was captured on dailymail.co.uk (bug 1511731), and it demonstrates that this slow path is an actual performance problem. We shouldn't spend 1.5 seconds in a single paint on updating regions.
Keywords: perf
OS: All → Android
Priority: -- → P3
See Also: → 1368386
Whiteboard: [gfx-noted]
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.