mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1236167: P1. Do not attempt to destroy a non allocated surface. r=nical
This commit is contained in:
parent
b9834bc732
commit
91209d30e3
@ -514,26 +514,27 @@ ClientLayerManager::MakeSnapshotIfRequired()
|
||||
if (!bounds.IsEmpty() &&
|
||||
mForwarder->AllocSurfaceDescriptor(bounds.Size(),
|
||||
gfxContentType::COLOR_ALPHA,
|
||||
&inSnapshot) &&
|
||||
remoteRenderer->SendMakeSnapshot(inSnapshot, bounds)) {
|
||||
RefPtr<DataSourceSurface> surf = GetSurfaceForDescriptor(inSnapshot);
|
||||
DrawTarget* dt = mShadowTarget->GetDrawTarget();
|
||||
&inSnapshot)) {
|
||||
if (remoteRenderer->SendMakeSnapshot(inSnapshot, bounds)) {
|
||||
RefPtr<DataSourceSurface> surf = GetSurfaceForDescriptor(inSnapshot);
|
||||
DrawTarget* dt = mShadowTarget->GetDrawTarget();
|
||||
|
||||
Rect dstRect(bounds.x, bounds.y, bounds.width, bounds.height);
|
||||
Rect srcRect(0, 0, bounds.width, bounds.height);
|
||||
Rect dstRect(bounds.x, bounds.y, bounds.width, bounds.height);
|
||||
Rect srcRect(0, 0, bounds.width, bounds.height);
|
||||
|
||||
gfx::Matrix rotate =
|
||||
ComputeTransformForUnRotation(outerBounds.ToUnknownRect(),
|
||||
mTargetRotation);
|
||||
gfx::Matrix rotate =
|
||||
ComputeTransformForUnRotation(outerBounds.ToUnknownRect(),
|
||||
mTargetRotation);
|
||||
|
||||
gfx::Matrix oldMatrix = dt->GetTransform();
|
||||
dt->SetTransform(rotate * oldMatrix);
|
||||
dt->DrawSurface(surf, dstRect, srcRect,
|
||||
DrawSurfaceOptions(),
|
||||
DrawOptions(1.0f, CompositionOp::OP_OVER));
|
||||
dt->SetTransform(oldMatrix);
|
||||
gfx::Matrix oldMatrix = dt->GetTransform();
|
||||
dt->SetTransform(rotate * oldMatrix);
|
||||
dt->DrawSurface(surf, dstRect, srcRect,
|
||||
DrawSurfaceOptions(),
|
||||
DrawOptions(1.0f, CompositionOp::OP_OVER));
|
||||
dt->SetTransform(oldMatrix);
|
||||
}
|
||||
mForwarder->DestroySharedSurface(&inSnapshot);
|
||||
}
|
||||
mForwarder->DestroySharedSurface(&inSnapshot);
|
||||
}
|
||||
}
|
||||
mShadowTarget = nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user