mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 14:55:47 +00:00
Bug 1145981 - Do not crash when a DIB texture is updated without a compositor. r=jrmuizel
This commit is contained in:
parent
aff1fa6b6c
commit
932eee262e
@ -144,6 +144,12 @@ DIBTextureHost::GetTextureSources()
|
||||
void
|
||||
DIBTextureHost::Updated(const nsIntRegion* aRegion)
|
||||
{
|
||||
if (!mCompositor) {
|
||||
// This can happen if we send textures to a compositable that isn't yet
|
||||
// attached to a layer.
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mTextureSource) {
|
||||
mTextureSource = mCompositor->CreateDataTextureSource(mFlags);
|
||||
}
|
||||
|
@ -503,10 +503,8 @@ BufferTextureHost::Upload(nsIntRegion *aRegion)
|
||||
return false;
|
||||
}
|
||||
if (!mCompositor) {
|
||||
NS_WARNING("Tried to upload without a compositor. Skipping texture upload...");
|
||||
// If we are in this situation it means we should have called SetCompositor
|
||||
// earlier. It is conceivable that on certain rare conditions with async-video
|
||||
// we may end up here for the first frame, but this should not happen repeatedly.
|
||||
// This can happen if we send textures to a compositable that isn't yet
|
||||
// attached to a layer.
|
||||
return false;
|
||||
}
|
||||
if (mFormat == gfx::SurfaceFormat::UNKNOWN) {
|
||||
|
Loading…
Reference in New Issue
Block a user