зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1713769 - Ensure extracting SkImage subset is actually successful. r=gfx-reviewers,jrmuizel
If ExtractSubset fails on an SkImage, we may accidentally call image->makeShader with a null image below that. We need to bail out in that case so that we don't do that. Differential Revision: https://phabricator.services.mozilla.com/D128667
This commit is contained in:
Родитель
a80aa30af6
Коммит
b2f18bd6b9
|
@ -573,6 +573,10 @@ static void SetPaintPattern(SkPaint& aPaint, const Pattern& aPattern,
|
|||
|
||||
if (!pat.mSamplingRect.IsEmpty()) {
|
||||
image = ExtractSubset(image, pat.mSamplingRect);
|
||||
if (!image) {
|
||||
aPaint.setColor(SK_ColorTRANSPARENT);
|
||||
break;
|
||||
}
|
||||
mat.preTranslate(pat.mSamplingRect.X(), pat.mSamplingRect.Y());
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче