Cherry-pick fixes from master into 1.16
This cherry-picks from master into 1.16, all the fixes from the point where those branches diverged. This is all commits except the following:
- a34cb719, 1df0a684, d061570a, 0f6ca43f - Commits for the new floating-point color formats
- The
clip-boxes
commits that are in churn now from !12 (merged).