kwin: Check that color correction is enabled in setupForOutput()
Return early if color correction is disabled, so this function becomes a no-op in that case.
This commit is contained in:
parent
209e44cad2
commit
9d03e16c34
1 changed files with 1 additions and 4 deletions
|
@ -327,7 +327,7 @@ void ColorCorrection::setupForOutput(int screen)
|
||||||
{
|
{
|
||||||
Q_D(ColorCorrection);
|
Q_D(ColorCorrection);
|
||||||
|
|
||||||
if (d->m_hasError)
|
if (!d->m_enabled || d->m_hasError)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Clear any previous GL errors
|
// Clear any previous GL errors
|
||||||
|
@ -348,9 +348,6 @@ void ColorCorrection::setupForOutput(int screen)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!shader->setUniform("u_ccLookupTexture", d->m_ccTextureUnit)) {
|
if (!shader->setUniform("u_ccLookupTexture", d->m_ccTextureUnit)) {
|
||||||
// This means the color correction shaders are probably not loaded
|
|
||||||
if (!d->m_enabled)
|
|
||||||
return;
|
|
||||||
kError(1212) << "unable to set uniform for the color correction lookup texture";
|
kError(1212) << "unable to set uniform for the color correction lookup texture";
|
||||||
d->m_hasError = true;
|
d->m_hasError = true;
|
||||||
emit errorOccured();
|
emit errorOccured();
|
||||||
|
|
Loading…
Reference in a new issue