зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1145981 - Do not crash when a DIB texture is updated without a compositor. r=jrmuizel
This commit is contained in:
Родитель
b868cc3d28
Коммит
1985a49b47
|
@ -145,6 +145,12 @@ DIBTextureHost::BindTextureSource(CompositableTextureSourceRef& aTexture)
|
|||
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);
|
||||
}
|
||||
|
|
|
@ -497,10 +497,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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче