kwin: Make PaintRedirector work without NPOT texture support

BUG: 321865
This commit is contained in:
Fredrik Höglund 2013-07-07 19:49:51 +02:00 committed by Martin Gräßlin
parent bdc1883fcf
commit a61009b152

View file

@ -348,6 +348,13 @@ void OpenGLPaintRedirector::resizePixmaps(const QRect *rects)
size[TopBottom] = QSize(align(qMax(rects[TopPixmap].width(), rects[BottomPixmap].width()), 128),
rects[TopPixmap].height() + rects[BottomPixmap].height());
if (!GLTexture::NPOTTextureSupported()) {
for (int i = 0; i < 2; i++) {
size[i].rwidth() = nearestPowerOfTwo(size[i].width());
size[i].rheight() = nearestPowerOfTwo(size[i].height());
}
}
bool fbo_bound = false;
for (int i = 0; i < 2; i++) {