MetaTextureTower: actually mark revalidated levels as valid

We were never actually clearing the invalid area on the smaller levels
of the texture tower, so we recomputed those levels every time.

[endlessm/eos-shell#3578]
shaped-texture: Cherry-pick paint method from upstream

This imports new code from upstream which improves how windows are
painted, making it faster.

This partly fixes [endlessm/eos-shell#1585].

[endlessm/eos-shell#3578]