Skip save layers where CTM isn't finite
In the old layer creation, I believe nan matrices were creating non-finite bounds that then failed intersection tests, which led to no layer or device being made. With the new system focusing on device-to- device relationships, the nan's weren't impacting bounds but led to issues inverting the global-to-device matrix. It's better to just be explicit about this anyways. Bug: chromium:1217062 Change-Id: I44e792d0bfad91025c5a727b6bcc74b09bdfcc44 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419856 Commit-Queue: Robert Phillips <robertphillips@google.com> Auto-Submit: Michael Ludwig <michaelludwig@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
This commit is contained in:
parent
a377a92f8f
commit
c026ade321
@ -762,7 +762,8 @@ static std::pair<skif::Mapping, skif::LayerSpace<SkIRect>> get_layer_mapping_and
|
||||
const skif::ParameterSpace<SkRect>* contentBounds = nullptr,
|
||||
bool mustCoverDst = true) {
|
||||
skif::ParameterSpace<SkPoint> center;
|
||||
if (!compute_decomposition_center(localToDst, contentBounds, targetOutput, ¢er)) {
|
||||
if (!localToDst.isFinite() ||
|
||||
!compute_decomposition_center(localToDst, contentBounds, targetOutput, ¢er)) {
|
||||
return {{}, skif::LayerSpace<SkIRect>(SkIRect::MakeEmpty())};
|
||||
}
|
||||
// *after* possibly getting a representative point from the provided content bounds, it might
|
||||
|
Loading…
Reference in New Issue
Block a user