Simplify domain insetting for bulk texture ops

Previously, the normalization, origin flip, and insetting occurred
simultanesouly. The problem was that whether or not the insetting
was needed had a cyclic dependency with the overall filter level
(not known until the end of the loop). So it had an ugly hack that
kept track of the early appended quads and would update their domains
if needed.

This will no longer work when perspective clipping is implemented because
we won't have a 1-1 mapping from quads+viewcount pairs back to the
texture set entries. However, by splitting the insetting out from the
rest of the normalization step, we can defer it until we're in
onPrePrepare w/o losing any optimization capabilities and scales with
the perspective clipping change in the future. It should also make it
easier to upgrade an op from kNearest to kBilerp in onCombineIfPossible
because the prior op will not have applied the bilerp-insetting yet.

Bug: skia:9779
Change-Id: I71b269730de200b8452e2a6b39b777928967f621
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/269151
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
1 file changed