Now that scrolling roots are properly sized, we can simply look at the
scrolling root layer size when deciding the extents of layer scrolling.
This simplifies things a bit and further codifies the current model of
scrolling root + mask_to_bounds.
When interacting with Layers it is simpler to use LayerPixels, which
are unscaled pixels in the Layer coordinate system. This removes a lot
of room for error and makes things simpler.
Base layers (the background layer of each frame) shouldn't override the
size of their root layers. This allows base layers to scroll inside
root layer frames. This does mean that when determining the maximum
scroll position, we need to look at the size of scrolling root children
though.
Root layers should be sized to their frame rectangles and the root of
the root layers should track the window size. This is important because
layers need to be properly sized to scroll.
This allows iframe layers to move properly when their parents scroll
and is necessary to properly track their masking rects as their
children move and to draw their backgrounds in the proper position.
Content offset is now stored in unscaled pixels, so that it can be
applied to tile positions during compositor rendering without unscaling
it. This means that when using it in calculations of layer size (stored
in device pixels), we need to scale it. Scene scale is now stored as a
scale rather than a transformation.
Fixes#3269.
Fixes#3042.
Instead of producing image output as soon as the first pipeline is
ready, we wait to produce the output until all pipelines are in the
idle RenderState. This should remove a race condition when running
reference tests.
Instead of waiting to create the root layer, create them as soon as the
Compositor receives the frame tree. This allows the compositor to
create a layer tree skeleton of which to hang the base layers when they
are ready.