Add SkClipStack::replaceClip() separate from deprecated clip op

The replaceClip functionality was added to allow Android to move off of
generalized expanding clips. At the time, SkClipStack simply used the
kReplace_SkClipOp to handle it. In order to remove those expanding ops,
SkClipStack will need a proper implementation of replaceClip().

The clip elements have an additional field to mark if
it's a replace (and it's op will be kIntersect). Adds a temporary
getRegionOp() function to unify elements that use this field vs.
elements that use the deprecated clip op (i.e. if they were deserialized
from an SKP that recorded an expanding op).

Clients of SkClipOp that checked for replace ops use the new function
instead of referring to the enum value directly.

Bug: skia:10209
Change-Id: I1c16c87fadb2becfe181db717c05e240ac87fd34
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/436158
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
9 files changed