We push a bit up the tree during preroll to learn whether there system
composited layers below each layer. During update scene, we squash down
to paint tasks, which we execute after publishing the new scene.
When we pipelined the drawing commands we caused UpdateScene to be called
before Preroll, which isn't allowed. Now we call Preroll, UpdateScene, and
Paint separately.
We could get into a situation where the second time we rasterize a picture for an SKP, the raster cache detects that the same picture is being repeated in subsequent onscreen frames and then proceeds to rasterize the contents to an offscreen texture. This not only causes an unnecessary cache entry, but also shows the cached image in the final SKP trace (which is not what was originally displayed on screen).
This patch introduces a //glue library that isolates our dependency on //base.
This will let us clean up our //base dependencies ahead of actually being able
to fully remove them.
Instead, make Layer::Paint take a new PaintContext that has just exactly
the state that it needs, mirroring PrerollContext. Also, rename
PaintContext to CompositorContext because it holds the context for the
whole compositor.
Previously we just dropped child scenes on the floor. Now we upload them
to Mozart. However, we just draw them on top of all the other content
and don't apply any clips or blends.