Make cap only affect the keys of GrShapes that are possibly-open

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1949193002

Review-Url: https://codereview.chromium.org/1949193002
5 files changed