Skip to content

[css-transforms] Provide a way to specify rastered content scale for transformed content #236

@chrishtr

Description

@chrishtr

[css-transforms]

Currently, developers have no control over the scale at which to raster content with transforms. If the transform is not compositor-animated, there is only one logical answer (layout content scale plus transform). However, for performance reasons, compositor animations often work by scaling a pre-rastered bitmap in the GPU. This begs the question of the scale at which to raster that bitmap.

Each browser has its own heuristics for choosing the scale of these bitmaps, and when to re-raster them
when the scale changes. This is a problem when the heuristics fail, because the developer has no control
over details of performance and quality that are important for a high-quality rendered output.

Blink has recently done work to improve this situation. Some documents on what we're doing and background:

What we're doing: https://docs.google.com/a/chromium.org/document/d/1f8WS99F9GORWP_m74l_JfsTHgCrHkbEorHYu72D4Xag/edit?usp=drive_web&usp=docs_home&ths=true

Investigation of situation before the above and alternatives considered:
https://docs.google.com/document/d/1CsDfsMxZaM094VhTDrHXF86_rmFnpjM8xL3iEh7HWgg/edit#heading=h.omyv4h6h0sym

One thing that the above plans do not cover is control over current-frame raster scale, if the desired such scale differs from the "ideal" scale (meaning layout scale + transform). There are cases where this is desired, for example rastering at a destination scale then animating to it, to maximize quality and performance. (Note that this is how Blink actually implements declarative CSS animation rastering today)
See also this blink-dev thread for examples and related discussion:
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/Ufwrhx_iZ7U

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions