diff --git a/gfx/gl/GLBlitHelper.cpp b/gfx/gl/GLBlitHelper.cpp index 403413dec406..ab3c2a2a2314 100644 --- a/gfx/gl/GLBlitHelper.cpp +++ b/gfx/gl/GLBlitHelper.cpp @@ -1326,15 +1326,8 @@ bool GLBlitHelper::BlitImage(layers::GPUVideoImage* const srcImage, // ------------------------------------- #ifdef MOZ_WAYLAND -bool GLBlitHelper::BlitImage(layers::DMABUFSurfaceImage* srcImage, - const gfx::IntSize& destSize, - OriginPos destOrigin) const { - DMABufSurface* surface = srcImage->GetSurface(); - if (!surface) { - gfxCriticalError() << "Null DMABUFSurface for GLBlitHelper::BlitImage"; - return false; - } - +bool GLBlitHelper::Blit(DMABufSurface* surface, const gfx::IntSize& destSize, + OriginPos destOrigin) const { const auto& srcOrigin = OriginPos::BottomLeft; DrawBlitProg::BaseArgs baseArgs; @@ -1388,6 +1381,17 @@ bool GLBlitHelper::BlitImage(layers::DMABUFSurfaceImage* srcImage, return true; } + +bool GLBlitHelper::BlitImage(layers::DMABUFSurfaceImage* srcImage, + const gfx::IntSize& destSize, + OriginPos destOrigin) const { + DMABufSurface* surface = srcImage->GetSurface(); + if (!surface) { + gfxCriticalError() << "Null DMABUFSurface for GLBlitHelper::BlitImage"; + return false; + } + return Blit(surface, destSize, destOrigin); +} #endif } // namespace gl diff --git a/gfx/gl/GLBlitHelper.h b/gfx/gl/GLBlitHelper.h index 3dd73e4104b3..a34bdba9ffdf 100644 --- a/gfx/gl/GLBlitHelper.h +++ b/gfx/gl/GLBlitHelper.h @@ -40,6 +40,10 @@ class MacIOSurface; # include "mozilla/java/GeckoSurfaceTextureWrappers.h" #endif +#ifdef MOZ_WAYLAND +class DMABufSurface; +#endif + namespace mozilla { namespace layers { @@ -190,6 +194,8 @@ class GLBlitHelper final { const gfx::IntSize& destSize, OriginPos destOrigin) const; #endif #ifdef MOZ_WAYLAND + bool Blit(DMABufSurface* surface, const gfx::IntSize& destSize, + OriginPos destOrigin) const; bool BlitImage(layers::DMABUFSurfaceImage* srcImage, const gfx::IntSize& destSize, OriginPos destOrigin) const; #endif