Currently we only turn on subpixel rendering when the entire layer is opaque, but we could enable subpixel text rendering as long as all of the text was drawn on top of opaque content.
As a first approximation we can record the bounding rectangle of all text drawn by descendants and compare this to our BackgroundKnownOpaqueRect when determining whether we can safely turn on subpixel text rendering (and thus safe to composite the element on low dpi without degrading text rendering quality).
Why do this?
This will potentially enable promoting many more elements automatically on low-dpi which can dramatically improve the performance of scrolling and animations. For example, we could automatically promote overflow: scroll and position: fixed elements with:
- border-radius backgrounds.
- no text (common for fixed position headers containing images)
- text only over opaque regions (often the scroller itself does not have a background but a child containing the text does)
This will also improve the low-dpi text rendering quality on many sites with existing automatic promotion due to compositing triggers or animations.
Comment 1 by flackr@chromium.org
, Aug 31 2016