kwinglutils: Drop GLRenderTarget::isRenderTargetBound()

Check whether GLRenderTarget::currentRenderTarget() returns non-null
value instead.
This commit is contained in:
Vlad Zahorodnii 2022-02-15 13:23:36 +02:00
parent f4f83848b0
commit 7a06ae733c
3 changed files with 3 additions and 9 deletions

View file

@ -40,7 +40,7 @@ EglGbmBackend::EglGbmBackend(VirtualBackend *b)
EglGbmBackend::~EglGbmBackend()
{
while (GLRenderTarget::isRenderTargetBound()) {
while (GLRenderTarget::currentRenderTarget()) {
GLRenderTarget::popRenderTarget();
}
delete m_fbo;
@ -90,7 +90,7 @@ void EglGbmBackend::init()
return;
}
GLRenderTarget::pushRenderTarget(m_fbo);
if (!m_fbo->isRenderTargetBound()) {
if (!GLRenderTarget::currentRenderTarget()) {
setFailed("Failed to bind framebuffer object");
return;
}
@ -153,7 +153,7 @@ SurfaceTexture *EglGbmBackend::createSurfaceTextureWayland(SurfacePixmapWayland
QRegion EglGbmBackend::beginFrame(AbstractOutput *output)
{
Q_UNUSED(output)
if (!GLRenderTarget::isRenderTargetBound()) {
if (!GLRenderTarget::currentRenderTarget()) {
GLRenderTarget::pushRenderTarget(m_fbo);
}
return QRegion(0, 0, screens()->size().width(), screens()->size().height());

View file

@ -934,11 +934,6 @@ void GLRenderTarget::cleanup()
s_blitSupported = false;
}
bool GLRenderTarget::isRenderTargetBound()
{
return !s_renderTargets.isEmpty();
}
bool GLRenderTarget::blitSupported()
{
return s_blitSupported;

View file

@ -446,7 +446,6 @@ public:
static void pushRenderTarget(GLRenderTarget *target);
static GLRenderTarget *popRenderTarget();
static bool isRenderTargetBound();
/**
* Whether the GL_EXT_framebuffer_blit extension is supported.
* This functionality is not available in OpenGL ES 2.0.