mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1012961 - ABORT: Invalid SurfaceDescriptor passed in: file gfx/layers/opengl/GrallocTextureHost.cpp, line 292. r=nical
This commit is contained in:
parent
58ecede7d1
commit
3573fa4057
@ -287,7 +287,7 @@ void
|
||||
SharedBufferManagerChild::DeallocGrallocBuffer(const mozilla::layers::MaybeMagicGrallocBufferHandle& aBuffer)
|
||||
{
|
||||
#ifdef MOZ_HAVE_SURFACEDESCRIPTORGRALLOC
|
||||
NS_ASSERTION(aBuffer.type() != mozilla::layers::MaybeMagicGrallocBufferHandle::TMagicGrallocBufferHandle, "We shouldn't trying to do IPC with real buffer");
|
||||
NS_ASSERTION(aBuffer.type() != mozilla::layers::MaybeMagicGrallocBufferHandle::TMagicGrallocBufferHandle, "We shouldn't try to do IPC with real buffer");
|
||||
if (aBuffer.type() != mozilla::layers::MaybeMagicGrallocBufferHandle::TGrallocBufferRef) {
|
||||
return;
|
||||
}
|
||||
@ -305,7 +305,7 @@ void
|
||||
SharedBufferManagerChild::DeallocGrallocBufferNow(const mozilla::layers::MaybeMagicGrallocBufferHandle& aBuffer)
|
||||
{
|
||||
#ifdef MOZ_HAVE_SURFACEDESCRIPTORGRALLOC
|
||||
NS_ASSERTION(aBuffer.type() != mozilla::layers::MaybeMagicGrallocBufferHandle::TMagicGrallocBufferHandle, "We shouldn't trying to do IPC with real buffer");
|
||||
NS_ASSERTION(aBuffer.type() != mozilla::layers::MaybeMagicGrallocBufferHandle::TMagicGrallocBufferHandle, "We shouldn't try to do IPC with real buffer");
|
||||
|
||||
{
|
||||
MutexAutoLock lock(mBufferMutex);
|
||||
@ -325,7 +325,7 @@ bool SharedBufferManagerChild::RecvDropGrallocBuffer(const mozilla::layers::Mayb
|
||||
|
||||
{
|
||||
MutexAutoLock lock(mBufferMutex);
|
||||
NS_ASSERTION(mBuffers.count(bufferKey) != 0, "Not my buffer");
|
||||
NS_ASSERTION(mBuffers.count(bufferKey) != 0, "No such buffer");
|
||||
mBuffers.erase(bufferKey);
|
||||
}
|
||||
#endif
|
||||
|
@ -197,7 +197,7 @@ bool SharedBufferManagerParent::RecvDropGrallocBuffer(const mozilla::layers::May
|
||||
sp<GraphicBuffer> buf = GetGraphicBuffer(bufferKey);
|
||||
MOZ_ASSERT(buf.get());
|
||||
MutexAutoLock lock(mBuffersMutex);
|
||||
NS_ASSERTION(mBuffers.count(bufferKey) == 1, "How can you drop others buffer");
|
||||
NS_ASSERTION(mBuffers.count(bufferKey) == 1, "No such buffer");
|
||||
mBuffers.erase(bufferKey);
|
||||
|
||||
if(!buf.get()) {
|
||||
@ -252,7 +252,7 @@ void SharedBufferManagerParent::DropGrallocBufferImpl(mozilla::layers::SurfaceDe
|
||||
key = handle.get_MagicGrallocBufferHandle().mRef.mKey;
|
||||
|
||||
NS_ASSERTION(key != -1, "Invalid buffer key");
|
||||
NS_ASSERTION(mBuffers.count(key) == 1, "How can you drop others buffer");
|
||||
NS_ASSERTION(mBuffers.count(key) == 1, "No such buffer");
|
||||
mBuffers.erase(key);
|
||||
SendDropGrallocBuffer(handle);
|
||||
#endif
|
||||
@ -275,8 +275,13 @@ android::sp<android::GraphicBuffer>
|
||||
SharedBufferManagerParent::GetGraphicBuffer(int key)
|
||||
{
|
||||
MutexAutoLock lock(mBuffersMutex);
|
||||
NS_ASSERTION(mBuffers.count(key) == 1, "No such buffer, or the buffer is belongs to other session");
|
||||
return mBuffers[key];
|
||||
if (mBuffers.count(key) == 1) {
|
||||
return mBuffers[key];
|
||||
}
|
||||
else {
|
||||
// The buffer can be dropped, or invalid
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
android::sp<android::GraphicBuffer>
|
||||
|
Loading…
Reference in New Issue
Block a user