Bug 1613052 [Wayland] Don't release textures at WaylandDMABUFTextureHostOGL as they're owned by texture source, r=sotaro

Depends on D61547

Differential Revision: https://phabricator.services.mozilla.com/D61548

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Martin Stransky 2020-02-05 08:31:08 +00:00
parent 06c955cfc2
commit c8f1770150
2 changed files with 1 additions and 17 deletions

View file

@ -24,9 +24,6 @@ WaylandDMABUFTextureHostOGL::WaylandDMABUFTextureHostOGL(
WaylandDMABUFTextureHostOGL::~WaylandDMABUFTextureHostOGL() {
MOZ_COUNT_DTOR(WaylandDMABUFTextureHostOGL);
if (mProvider) {
DeallocateDeviceData();
}
}
bool WaylandDMABUFTextureHostOGL::Lock() {
@ -47,25 +44,14 @@ bool WaylandDMABUFTextureHostOGL::Lock() {
void WaylandDMABUFTextureHostOGL::Unlock() {}
void WaylandDMABUFTextureHostOGL::DeallocateDeviceData() {
mTextureSource = nullptr;
if (mSurface) {
mSurface->ReleaseEGLImage();
}
}
void WaylandDMABUFTextureHostOGL::SetTextureSourceProvider(
TextureSourceProvider* aProvider) {
if (!aProvider || !aProvider->GetGLContext()) {
DeallocateDeviceData();
mTextureSource = nullptr;
mProvider = nullptr;
return;
}
if (mProvider != aProvider) {
DeallocateDeviceData();
}
mProvider = aProvider;
if (mTextureSource) {

View file

@ -25,8 +25,6 @@ class WaylandDMABUFTextureHostOGL : public TextureHost {
const SurfaceDescriptor& aDesc);
virtual ~WaylandDMABUFTextureHostOGL();
void DeallocateDeviceData() override;
void SetTextureSourceProvider(TextureSourceProvider* aProvider) override;
bool Lock() override;