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.
The code that draws the picture knows more about the picture (and the future)
than we do. This patch gives them a way to hint us about what's going to
happen with the picture in the future.
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.
After an application is suspended and the GrContext associated with the
Flutter view is destroyed, the raster cache still contains images tied
to the defunct context. The SkyShell process will crash if these images
are used after the application resumes.
When rasterzing with a non-zero left and top offset, we need to apply the scale
first so that we're translating in the correct coordinate system.
Fixes https://github.com/flutter/flutter/issues/1292
The matrix argument to drawPicture doesn't seem to do what we want exactly.
Instead, use the normal matrix in the canvas. Also, handle cull rects with
non-zero left and top coordinates.
Fixes#1229