From 9af2eb0bfc1eb8d00565ec5738693c76e41f8e6f Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Mon, 5 Jun 2023 14:10:10 +0300 Subject: [PATCH] backends/drm: Drop EglGbmBackend::{importBufferObjectAsImage,importBufferObjectAsTexture} They're unused. --- src/backends/drm/drm_egl_backend.cpp | 19 ------------------- src/backends/drm/drm_egl_backend.h | 4 ---- 2 files changed, 23 deletions(-) diff --git a/src/backends/drm/drm_egl_backend.cpp b/src/backends/drm/drm_egl_backend.cpp index 6f3ab6ec65..73ef8cff82 100644 --- a/src/backends/drm/drm_egl_backend.cpp +++ b/src/backends/drm/drm_egl_backend.cpp @@ -22,7 +22,6 @@ #include "drm_output.h" #include "drm_pipeline.h" #include "drm_virtual_egl_layer.h" -#include "gbm_dmabuf.h" #include "kwineglutils_p.h" #include "options.h" #include "scene/surfaceitem_wayland.h" @@ -280,22 +279,4 @@ bool operator==(const GbmFormat &lhs, const GbmFormat &rhs) return lhs.drmFormat == rhs.drmFormat; } -EGLImageKHR EglGbmBackend::importBufferObjectAsImage(gbm_bo *bo) -{ - std::optional attributes = dmaBufAttributesForBo(bo); - if (!attributes.has_value()) { - return EGL_NO_IMAGE_KHR; - } - return importDmaBufAsImage(attributes.value()); -} - -std::shared_ptr EglGbmBackend::importBufferObjectAsTexture(gbm_bo *bo) -{ - std::optional attributes = dmaBufAttributesForBo(bo); - if (!attributes.has_value()) { - return nullptr; - } - return importDmaBufAsTexture(attributes.value()); -} - } // namespace KWin diff --git a/src/backends/drm/drm_egl_backend.h b/src/backends/drm/drm_egl_backend.h index cdb4b1b508..f471272d59 100644 --- a/src/backends/drm/drm_egl_backend.h +++ b/src/backends/drm/drm_egl_backend.h @@ -16,8 +16,6 @@ #include #include -struct gbm_bo; - namespace KWaylandServer { class SurfaceInterface; @@ -73,8 +71,6 @@ public: std::optional gbmFormatForDrmFormat(uint32_t format) const; DrmGpu *gpu() const; - EGLImageKHR importBufferObjectAsImage(gbm_bo *bo); - std::shared_ptr importBufferObjectAsTexture(gbm_bo *bo); EglContext *contextForGpu(DrmGpu *gpu); private: