mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1770560 [Linux] Implement GLBlitHelper::Blit(DMABufSurface* surface,...) to blit DMABufSurface directly r=sotaro,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D146989
This commit is contained in:
parent
897738dfed
commit
b292c031de
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user