DescriptionFix SkMergeImageFilter crop rect computation.
The crop rect should be applied to the union of the input bounds, not
to the src input's bounds. These are often the same, since the saveLayer
offscreen size is computed as the union of all the required bounds, but
is not correct if the input primitive is not used (e.g., if all inputs
are connected to SkImageSources). But this will change as we
move to more accurate intermediate bounds computations (getting rid of the join() hacks as described in skbug.com/3194).
Since we can't know this without actually processing the inputs,
split SkMergeImageFilter processing into:
- filter all inputs
- applyCropRect to the union'ed bounds
- allocate the destination
- do the merge
BUG=3194
Committed: https://skia.googlesource.com/skia/+/4a24398391536f7b176b44a8c45dc288655b4adb
Patch Set 1 #Patch Set 2 : 100-col fixes #Patch Set 3 : Fix uninitialized var, and restore abort-on-no-valid-inputs behaviour. #
Total comments: 8
Patch Set 4 : Fixes per review comments #Patch Set 5 : Add comments; this-> #Messages
Total messages: 15 (6 generated)
|