Check for valid z-transform function in shadow generation
Bug: oss-fuzz:5630 Change-Id: I608a8a2db608396932eb732b8d7b61ab9fbcc322 Reviewed-on: https://skia-review.googlesource.com/105223 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
This commit is contained in:
parent
0b33cc42b4
commit
7c8008c0bd
@ -384,7 +384,9 @@ SkAmbientShadowTessellator::SkAmbientShadowTessellator(const SkPath& path,
|
||||
// make sure we're not below the canvas plane
|
||||
this->setZOffset(path.getBounds(), ctm.hasPerspective());
|
||||
|
||||
this->setTransformedHeightFunc(ctm);
|
||||
if (!this->setTransformedHeightFunc(ctm)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Outer ring: 3*numPts
|
||||
// Middle ring: numPts
|
||||
@ -828,7 +830,9 @@ SkSpotShadowTessellator::SkSpotShadowTessellator(const SkPath& path, const SkMat
|
||||
SkMatrix fullTransform = SkMatrix::Concat(shadowTransform, ctm);
|
||||
|
||||
// Set up our reverse mapping
|
||||
this->setTransformedHeightFunc(fullTransform);
|
||||
if (!this->setTransformedHeightFunc(fullTransform)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: calculate these reserves better
|
||||
// Penumbra ring: 3*numPts
|
||||
|
Loading…
Reference in New Issue
Block a user