rather omit lanczos than capping windows

capping shadows is seen as bug (and is ugly and
because of the non lanczos transition causes visual
flicker) so if the window+shadows extends the buffer,
lanczos is simply not possible.

BUG: 314838
FIXED-IN: 4.11
REVIEW: 111425
This commit is contained in:
Thomas Lübking 2013-07-07 13:57:00 +02:00
parent 674a1a051f
commit 04aa9e9531

View file

@ -184,28 +184,14 @@ void LanczosFilter::performPaint(EffectWindowImpl* w, int mask, QRegion region,
init();
const QRect screenRect = Workspace::self()->clientArea(ScreenArea, w->screen(), w->desktop());
// window geometry may not be bigger than screen geometry to fit into the FBO
if (m_shader && w->width() <= screenRect.width() && w->height() <= screenRect.height()) {
double left = 0;
double top = 0;
double right = w->width();
double bottom = w->height();
foreach (const WindowQuad & quad, data.quads) {
// we need this loop to include the decoration padding
left = qMin(left, quad.left());
top = qMin(top, quad.top());
right = qMax(right, quad.right());
bottom = qMax(bottom, quad.bottom());
}
double width = right - left;
double height = bottom - top;
if (width > screenRect.width() || height > screenRect.height()) {
// window with padding does not fit into the framebuffer
// so cut of the shadow
left = 0;
top = 0;
width = w->width();
height = w->height();
}
QRect winGeo(w->expandedGeometry());
if (m_shader && winGeo.width() <= screenRect.width() && winGeo.height() <= screenRect.height()) {
winGeo.translate(-w->geometry().topLeft());
double left = winGeo.left();
double top = winGeo.top();
double width = winGeo.right() - left;
double height = winGeo.bottom() - top;
int tx = data.xTranslation() + w->x() + left * data.xScale();
int ty = data.yTranslation() + w->y() + top * data.yScale();
int tw = width * data.xScale();