mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset b9e37b791afc (bug 1212646) for test failures on a CLOSED TREE
This commit is contained in:
parent
16123faf26
commit
30c9e69137
@ -4659,6 +4659,11 @@ PresShell::RenderDocument(const nsRect& aRect, uint32_t aFlags,
|
|||||||
gfxContextAutoSaveRestore save(aThebesContext);
|
gfxContextAutoSaveRestore save(aThebesContext);
|
||||||
|
|
||||||
CompositionOp oldOp = aThebesContext->CurrentOp();
|
CompositionOp oldOp = aThebesContext->CurrentOp();
|
||||||
|
if (oldOp == CompositionOp::OP_OVER) {
|
||||||
|
// Clip to the destination rectangle before we push the group,
|
||||||
|
// to limit the size of the temporary surface
|
||||||
|
aThebesContext->Clip();
|
||||||
|
}
|
||||||
|
|
||||||
// we want the window to be composited as a single image using
|
// we want the window to be composited as a single image using
|
||||||
// whatever operator was set; set OP_OVER here, which is
|
// whatever operator was set; set OP_OVER here, which is
|
||||||
@ -4671,14 +4676,17 @@ PresShell::RenderDocument(const nsRect& aRect, uint32_t aFlags,
|
|||||||
aThebesContext->PushGroup(NS_GET_A(aBackgroundColor) == 0xff ?
|
aThebesContext->PushGroup(NS_GET_A(aBackgroundColor) == 0xff ?
|
||||||
gfxContentType::COLOR :
|
gfxContentType::COLOR :
|
||||||
gfxContentType::COLOR_ALPHA);
|
gfxContentType::COLOR_ALPHA);
|
||||||
|
aThebesContext->Save();
|
||||||
|
|
||||||
// Clip now while we paint to the temporary surface. For
|
if (oldOp != CompositionOp::OP_OVER) {
|
||||||
// non-source-bounded operators (e.g., SOURCE), we need to do clip
|
// Clip now while we paint to the temporary surface. For
|
||||||
// here after we've pushed the group, so that eventually popping
|
// non-source-bounded operators (e.g., SOURCE), we need to do clip
|
||||||
// the group and painting it will be able to clear the entire
|
// here after we've pushed the group, so that eventually popping
|
||||||
// destination surface. PopGroup will take care of restoring.
|
// the group and painting it will be able to clear the entire
|
||||||
aThebesContext->Clip();
|
// destination surface.
|
||||||
aThebesContext->SetOp(CompositionOp::OP_OVER);
|
aThebesContext->Clip();
|
||||||
|
aThebesContext->SetOp(CompositionOp::OP_OVER);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nsDeviceContext* devCtx = mPresContext->DeviceContext();
|
nsDeviceContext* devCtx = mPresContext->DeviceContext();
|
||||||
@ -4753,6 +4761,7 @@ PresShell::RenderDocument(const nsRect& aRect, uint32_t aFlags,
|
|||||||
|
|
||||||
// if we had to use a group, paint it to the destination now
|
// if we had to use a group, paint it to the destination now
|
||||||
if (needsGroup) {
|
if (needsGroup) {
|
||||||
|
aThebesContext->Restore();
|
||||||
aThebesContext->PopGroupToSource();
|
aThebesContext->PopGroupToSource();
|
||||||
aThebesContext->Paint();
|
aThebesContext->Paint();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user