Bug 1578380 - [Wayland] Use WaylandDMABUF texure backend on Wayland when DMABuf is enabled, r=sotaro

Depends on D46840

Differential Revision: https://phabricator.services.mozilla.com/D46841
This commit is contained in:
Martin Stransky
2019-09-24 11:06:39 +00:00
parent 52563f7457
commit 4090a11278
3 changed files with 32 additions and 0 deletions

View File

@@ -31,6 +31,10 @@
# include "mozilla/webrender/RenderAndroidSurfaceTextureHostOGL.h"
#endif
#ifdef MOZ_WAYLAND
# include "mozilla/layers/WaylandDMABUFTextureHostOGL.h"
#endif
using namespace mozilla::gl;
using namespace mozilla::gfx;
@@ -77,6 +81,13 @@ already_AddRefed<TextureHost> CreateTextureHostOGL(
break;
}
#ifdef MOZ_WAYLAND
case SurfaceDescriptor::TSurfaceDescriptorDMABuf: {
result = new WaylandDMABUFTextureHostOGL(aFlags, aDesc);
break;
}
#endif
#ifdef XP_MACOSX
case SurfaceDescriptor::TSurfaceDescriptorMacIOSurface: {
const SurfaceDescriptorMacIOSurface& desc =