primitive, we also need to apply clip masks to them, when they
are required.

For example, a picture may have a transform on it, and when it
gets drawn it needs to sample from a clip mask in this case since
the coordinate systems are not equal and the local clip rect
can not be applied in this case.

This fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1439059.