kwineffects: Forbid most of operations with invalid render targets
This simplifies a lot of things.
This commit is contained in:
parent
383a5cee0b
commit
d92afc849e
1 changed files with 1 additions and 13 deletions
|
@ -1008,10 +1008,6 @@ GLRenderTarget::~GLRenderTarget()
|
|||
|
||||
bool GLRenderTarget::enable()
|
||||
{
|
||||
if (!mValid) {
|
||||
initFBO();
|
||||
}
|
||||
|
||||
if (!valid()) {
|
||||
qCCritical(LIBKWINGLUTILS) << "Can't enable invalid render target!";
|
||||
return false;
|
||||
|
@ -1026,10 +1022,6 @@ bool GLRenderTarget::enable()
|
|||
|
||||
bool GLRenderTarget::disable()
|
||||
{
|
||||
if (!mValid) {
|
||||
initFBO();
|
||||
}
|
||||
|
||||
if (!valid()) {
|
||||
qCCritical(LIBKWINGLUTILS) << "Can't disable invalid render target!";
|
||||
return false;
|
||||
|
@ -1131,14 +1123,10 @@ void GLRenderTarget::initFBO()
|
|||
|
||||
void GLRenderTarget::blitFromFramebuffer(const QRect &source, const QRect &destination, GLenum filter)
|
||||
{
|
||||
if (!GLRenderTarget::blitSupported()) {
|
||||
if (!valid()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mValid) {
|
||||
initFBO();
|
||||
}
|
||||
|
||||
GLRenderTarget::pushRenderTarget(this);
|
||||
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, mFramebuffer);
|
||||
glBindFramebuffer(GL_READ_FRAMEBUFFER, s_kwinFramebuffer);
|
||||
|
|
Loading…
Reference in a new issue