Bug 1804958 - Avoid unnecessary save/restore in ComputeClipExtsInDeviceSpace. r=gfx-reviewers,tnikkel,jrmuizel

I don't expect this to matter for a lot of content, however it avoids an assertion that causes a crashtest to fail.

Differential Revision: https://phabricator.services.mozilla.com/D165291
This commit is contained in:
Nicolas Silva 2023-01-05 14:42:49 +00:00
Родитель 53b7e952a9
Коммит 79a23d7ed3
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -506,9 +506,10 @@ class MixModeBlender {
// mode. Clip the source context first, so that we can generate a smaller
// temporary surface. (Since we will clip this context in
// SetupContextMatrix, a pair of save/restore is needed.)
gfxContextAutoSaveRestore saver(mSourceCtx);
gfxContextAutoSaveRestore saver;
if (!mFrame->HasAnyStateBits(NS_FRAME_IS_NONDISPLAY)) {
saver.SetContext(mSourceCtx);
// aFrame has a valid ink overflow rect, so clip to it before calling
// PushGroup() to minimize the size of the surfaces we'll composite:
gfxContextMatrixAutoSaveRestore matrixAutoSaveRestore(mSourceCtx);