mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 13:55:43 +00:00
Bug 1247380: Only copy the background if we can succesfully get a snapshot. r=jrmuizel
MozReview-Commit-ID: uWH7MtJmSp
This commit is contained in:
parent
cc7eba7dde
commit
693fff053b
@ -854,9 +854,11 @@ gfxContext::PushGroupAndCopyBackground(gfxContentType content, Float aOpacity, S
|
||||
mDT->PushLayer(content == gfxContentType::COLOR, aOpacity, aMask, aMaskTransform, IntRect(), false);
|
||||
}
|
||||
} else {
|
||||
if (pushOpaqueWithCopiedBG) {
|
||||
RefPtr<SourceSurface> source;
|
||||
// This snapshot can be nullptr if the DrawTarget is a cairo target that is currently
|
||||
// in an error state.
|
||||
if (pushOpaqueWithCopiedBG && (source = mDT->Snapshot())) {
|
||||
DrawTarget *oldDT = mDT;
|
||||
RefPtr<SourceSurface> source = mDT->Snapshot();
|
||||
Point oldDeviceOffset = CurrentState().deviceOffset;
|
||||
|
||||
PushNewDT(gfxContentType::COLOR);
|
||||
|
Loading…
Reference in New Issue
Block a user