diff --git a/src/plugins/screencast/outputscreencastsource.cpp b/src/plugins/screencast/outputscreencastsource.cpp index c37f918f00..45439dfce5 100644 --- a/src/plugins/screencast/outputscreencastsource.cpp +++ b/src/plugins/screencast/outputscreencastsource.cpp @@ -36,11 +36,6 @@ OutputScreenCastSource::~OutputScreenCastSource() pause(); } -bool OutputScreenCastSource::hasAlphaChannel() const -{ - return true; -} - quint32 OutputScreenCastSource::drmFormat() const { return DRM_FORMAT_ARGB8888; diff --git a/src/plugins/screencast/outputscreencastsource.h b/src/plugins/screencast/outputscreencastsource.h index 6b795e0f60..a416e50347 100644 --- a/src/plugins/screencast/outputscreencastsource.h +++ b/src/plugins/screencast/outputscreencastsource.h @@ -24,7 +24,6 @@ public: ~OutputScreenCastSource() override; uint refreshRate() const override; - bool hasAlphaChannel() const override; QSize textureSize() const override; quint32 drmFormat() const override; diff --git a/src/plugins/screencast/regionscreencastsource.cpp b/src/plugins/screencast/regionscreencastsource.cpp index 1d4aa7226e..0632ecc5a9 100644 --- a/src/plugins/screencast/regionscreencastsource.cpp +++ b/src/plugins/screencast/regionscreencastsource.cpp @@ -60,11 +60,6 @@ QSize RegionScreenCastSource::textureSize() const return m_region.size() * m_scale; } -bool RegionScreenCastSource::hasAlphaChannel() const -{ - return true; -} - quint32 RegionScreenCastSource::drmFormat() const { return DRM_FORMAT_ARGB8888; diff --git a/src/plugins/screencast/regionscreencastsource.h b/src/plugins/screencast/regionscreencastsource.h index 5a1809aeb3..c081dd6b1a 100644 --- a/src/plugins/screencast/regionscreencastsource.h +++ b/src/plugins/screencast/regionscreencastsource.h @@ -38,7 +38,6 @@ public: ~RegionScreenCastSource() override; quint32 drmFormat() const override; - bool hasAlphaChannel() const override; QSize textureSize() const override; uint refreshRate() const override; diff --git a/src/plugins/screencast/screencastsource.h b/src/plugins/screencast/screencastsource.h index bb92497a9e..c9627c2fb5 100644 --- a/src/plugins/screencast/screencastsource.h +++ b/src/plugins/screencast/screencastsource.h @@ -24,7 +24,6 @@ public: explicit ScreenCastSource(QObject *parent = nullptr); virtual uint refreshRate() const = 0; - virtual bool hasAlphaChannel() const = 0; virtual quint32 drmFormat() const = 0; virtual QSize textureSize() const = 0; diff --git a/src/plugins/screencast/windowscreencastsource.cpp b/src/plugins/screencast/windowscreencastsource.cpp index 034c9d308a..52ec1a1dbb 100644 --- a/src/plugins/screencast/windowscreencastsource.cpp +++ b/src/plugins/screencast/windowscreencastsource.cpp @@ -46,11 +46,6 @@ quint32 WindowScreenCastSource::drmFormat() const return DRM_FORMAT_ARGB8888; } -bool WindowScreenCastSource::hasAlphaChannel() const -{ - return true; -} - QSize WindowScreenCastSource::textureSize() const { return m_window->clientGeometry().size().toSize(); @@ -58,7 +53,7 @@ QSize WindowScreenCastSource::textureSize() const void WindowScreenCastSource::render(QImage *target) { - const auto offscreenTexture = GLTexture::allocate(hasAlphaChannel() ? GL_RGBA8 : GL_RGB8, textureSize()); + const auto offscreenTexture = GLTexture::allocate(GL_RGBA8, textureSize()); if (!offscreenTexture) { return; } diff --git a/src/plugins/screencast/windowscreencastsource.h b/src/plugins/screencast/windowscreencastsource.h index e87c352412..7f69fd0c22 100644 --- a/src/plugins/screencast/windowscreencastsource.h +++ b/src/plugins/screencast/windowscreencastsource.h @@ -24,7 +24,6 @@ public: ~WindowScreenCastSource() override; quint32 drmFormat() const override; - bool hasAlphaChannel() const override; QSize textureSize() const override; uint refreshRate() const override;