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.
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 were applying opacity in a different way than Skia
expects. Now we use the exact pattern that Skia expects so that we hit
more optimizations inside SkRecordOptimize.
After this patch, we don't actually get the optimization because we
don't yet run SkRecordOptimize over the composited tree. A later patch
will actually cause us to run SkRecordOptimize.