reduce the scope of two variables
reduce the scope of two variables REVIEW: 102057
This commit is contained in:
parent
646954ed9d
commit
26a492eb4a
2 changed files with 3 additions and 3 deletions
|
@ -193,13 +193,13 @@ void GLSLBlurShader::unbind()
|
|||
|
||||
int GLSLBlurShader::maxKernelSize() const
|
||||
{
|
||||
int value;
|
||||
#ifdef KWIN_HAVE_OPENGLES
|
||||
// GL_MAX_VARYING_FLOATS not available in GLES
|
||||
// querying for GL_MAX_VARYING_VECTORS crashes on nouveau
|
||||
// using the minimum value of 8
|
||||
return 8 * 2;
|
||||
#else
|
||||
int value;
|
||||
glGetIntegerv(GL_MAX_VARYING_FLOATS, &value);
|
||||
// Maximum number of vec4 varyings * 2
|
||||
// The code generator will pack two vec2's into each vec4.
|
||||
|
|
|
@ -775,7 +775,6 @@ void CoverSwitchEffect::paintFrontWindow(EffectWindow* frontWindow, int width, i
|
|||
{
|
||||
if (frontWindow == NULL)
|
||||
return;
|
||||
float distance = 0.0;
|
||||
bool specialHandlingForward = false;
|
||||
WindowPaintData data(frontWindow);
|
||||
data.xTranslate = area.width() * 0.5 - frontWindow->geometry().x() - frontWindow->geometry().width() * 0.5;
|
||||
|
@ -788,7 +787,8 @@ void CoverSwitchEffect::paintFrontWindow(EffectWindow* frontWindow, int width, i
|
|||
rightWindows = 1;
|
||||
}
|
||||
if (animation) {
|
||||
if (direction == Right) {
|
||||
float distance = 0.0;
|
||||
if (direction == Right) {
|
||||
// move to right
|
||||
distance = -frontWindow->geometry().width() * 0.5f + area.width() * 0.5f +
|
||||
(((float)displayWidth() * 0.5 * scaleFactor) - (float)area.width() * 0.5f) / rightWindows;
|
||||
|
|
Loading…
Reference in a new issue