forked from mirrors/gecko-dev
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:
parent
06c955cfc2
commit
c8f1770150
2 changed files with 1 additions and 17 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -25,8 +25,6 @@ class WaylandDMABUFTextureHostOGL : public TextureHost {
|
|||
const SurfaceDescriptor& aDesc);
|
||||
virtual ~WaylandDMABUFTextureHostOGL();
|
||||
|
||||
void DeallocateDeviceData() override;
|
||||
|
||||
void SetTextureSourceProvider(TextureSourceProvider* aProvider) override;
|
||||
|
||||
bool Lock() override;
|
||||
|
|
|
|||
Loading…
Reference in a new issue