X11TextureHost::X11TextureHost(TextureFlags aFlags, const SurfaceDescriptorX11& aDescriptor) : TextureHost(aFlags) { RefPtr<gfxXlibSurface> surface = aDescriptor.OpenForeign(); mSurface = surface.get(); if (!(aFlags & TextureFlags::DEALLOCATE_CLIENT)) { mSurface->TakePixmap(); } }
TextureHostX11::TextureHostX11(TextureFlags aFlags, const SurfaceDescriptorX11& aDescriptor) : TextureHost(aFlags) { nsRefPtr<gfxXlibSurface> surface = aDescriptor.OpenForeign(); mSurface = surface.get(); // The host always frees the pixmap. MOZ_ASSERT(!(aFlags & TEXTURE_DEALLOCATE_CLIENT)); mSurface->TakePixmap(); }