mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 623451: Don't double-release surfaces. r=jrmuizel a=b
This commit is contained in:
parent
24f6509560
commit
cd11268459
@ -415,6 +415,10 @@ ShadowLayersParent::RecvUpdate(const InfallibleTArray<Edit>& cset,
|
||||
nsRefPtr<gfxSharedImageSurface> newFront =
|
||||
gfxSharedImageSurface::Open(op.newFrontBuffer());
|
||||
nsRefPtr<gfxSharedImageSurface> newBack = canvas->Swap(newFront);
|
||||
if (newFront == newBack) {
|
||||
newFront.forget();
|
||||
}
|
||||
|
||||
canvas->Updated(op.updated());
|
||||
|
||||
replyv.push_back(OpBufferSwap(shadow, NULL,
|
||||
@ -433,6 +437,9 @@ ShadowLayersParent::RecvUpdate(const InfallibleTArray<Edit>& cset,
|
||||
nsRefPtr<gfxSharedImageSurface> newFront =
|
||||
gfxSharedImageSurface::Open(op.newFrontBuffer());
|
||||
nsRefPtr<gfxSharedImageSurface> newBack = image->Swap(newFront);
|
||||
if (newFront == newBack) {
|
||||
newFront.forget();
|
||||
}
|
||||
|
||||
replyv.push_back(OpBufferSwap(shadow, NULL,
|
||||
newBack->GetShmem()));
|
||||
|
@ -61,6 +61,7 @@ GetShmInfoPtr(const Shmem& aShmem)
|
||||
|
||||
gfxSharedImageSurface::~gfxSharedImageSurface()
|
||||
{
|
||||
MOZ_COUNT_DTOR(gfxSharedImageSurface);
|
||||
}
|
||||
|
||||
/*static*/ PRBool
|
||||
@ -75,6 +76,8 @@ gfxSharedImageSurface::gfxSharedImageSurface(const gfxIntSize& aSize,
|
||||
gfxImageFormat aFormat,
|
||||
const Shmem& aShmem)
|
||||
{
|
||||
MOZ_COUNT_CTOR(gfxSharedImageSurface);
|
||||
|
||||
mSize = aSize;
|
||||
mFormat = aFormat;
|
||||
mStride = ComputeStride(aSize, aFormat);
|
||||
|
Loading…
Reference in New Issue
Block a user