зеркало из https://github.com/mozilla/gecko-dev.git
Bug 912173 - Always AddRef and Release the GLContext when sharing a SurfaceStream to avoid mismatches. r=nrc
This commit is contained in:
Родитель
83ca0489b5
Коммит
fa8f16578a
|
@ -206,17 +206,13 @@ DeprecatedCanvasClientSurfaceStream::Update(gfx::IntSize aSize, ClientCanvasLaye
|
|||
#endif
|
||||
} else {
|
||||
SurfaceStreamHandle handle = stream->GetShareHandle();
|
||||
SurfaceDescriptor *desc = mDeprecatedTextureClient->GetDescriptor();
|
||||
if (desc->type() != SurfaceDescriptor::TSurfaceStreamDescriptor ||
|
||||
desc->get_SurfaceStreamDescriptor().handle() != handle) {
|
||||
*desc = SurfaceStreamDescriptor(handle, false);
|
||||
mDeprecatedTextureClient->SetDescriptor(SurfaceStreamDescriptor(handle, false));
|
||||
|
||||
// Bug 894405
|
||||
//
|
||||
// Ref this so the SurfaceStream doesn't disappear unexpectedly. The
|
||||
// Compositor will need to unref it when finished.
|
||||
aLayer->mGLContext->AddRef();
|
||||
}
|
||||
// Bug 894405
|
||||
//
|
||||
// Ref this so the SurfaceStream doesn't disappear unexpectedly. The
|
||||
// Compositor will need to unref it when finished.
|
||||
aLayer->mGLContext->AddRef();
|
||||
}
|
||||
|
||||
aLayer->Painted();
|
||||
|
|
|
@ -640,11 +640,8 @@ SurfaceStreamHostOGL::UpdateImpl(const SurfaceDescriptor& aImage,
|
|||
const SurfaceStreamDescriptor& streamDesc =
|
||||
aImage.get_SurfaceStreamDescriptor();
|
||||
|
||||
SurfaceStream *stream = SurfaceStream::FromHandle(streamDesc.handle());
|
||||
if (stream == mStream) {
|
||||
return;
|
||||
}
|
||||
mStream = stream;
|
||||
|
||||
mStream = SurfaceStream::FromHandle(streamDesc.handle());
|
||||
MOZ_ASSERT(mStream);
|
||||
mStreamGL = dont_AddRef(mStream->GLContext());
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче