mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 912725 - Do the registration of the TextureHost with the mBuffer exactly when we overwrite *mBuffer, so that in particular we don't do a bogus registration in the single-buffered case - r=nical
This commit is contained in:
parent
1873011a9a
commit
77fe55cbfe
@ -179,6 +179,15 @@ DeprecatedTextureHost::SwapTextures(const SurfaceDescriptor& aImage,
|
||||
*aResult = *mBuffer;
|
||||
}
|
||||
*mBuffer = aImage;
|
||||
// The following SetBuffer call was added in bug 912725 as a fix for the
|
||||
// hacky fix introduced in gecko 23 for bug 862324.
|
||||
// Note that it is a no-op in the generic case, but not for
|
||||
// GrallocDeprecatedTextureHostOGL which overrides SetBuffer to make it
|
||||
// register the TextureHost with the GrallocBufferActor.
|
||||
// The reason why this SetBuffer calls is needed here is that just above we
|
||||
// overwrote *mBuffer in place, so we need to tell the new mBuffer about this
|
||||
// TextureHost.
|
||||
SetBuffer(mBuffer, mDeAllocator);
|
||||
}
|
||||
|
||||
#ifdef MOZ_LAYERS_HAVE_LOG
|
||||
|
@ -1077,10 +1077,6 @@ GrallocDeprecatedTextureHostOGL::SwapTexturesImpl(const SurfaceDescriptor& aImag
|
||||
|
||||
DeleteTextures();
|
||||
|
||||
// only done for hacky fix in gecko 23 for bug 862324.
|
||||
// Doing this in SetBuffer is not enough, as DeprecatedImageHostBuffered::SwapTextures can
|
||||
// change the value of *mBuffer without calling SetBuffer again.
|
||||
RegisterDeprecatedTextureHostAtGrallocBufferActor(this, aImage);
|
||||
}
|
||||
|
||||
gl::GLContext*
|
||||
|
Loading…
Reference in New Issue
Block a user