kwin: Make PaintRedirector work without NPOT texture support
BUG: 321865
This commit is contained in:
parent
bdc1883fcf
commit
a61009b152
1 changed files with 7 additions and 0 deletions
|
@ -348,6 +348,13 @@ void OpenGLPaintRedirector::resizePixmaps(const QRect *rects)
|
||||||
size[TopBottom] = QSize(align(qMax(rects[TopPixmap].width(), rects[BottomPixmap].width()), 128),
|
size[TopBottom] = QSize(align(qMax(rects[TopPixmap].width(), rects[BottomPixmap].width()), 128),
|
||||||
rects[TopPixmap].height() + rects[BottomPixmap].height());
|
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;
|
bool fbo_bound = false;
|
||||||
|
|
||||||
for (int i = 0; i < 2; i++) {
|
for (int i = 0; i < 2; i++) {
|
||||||
|
|
Loading…
Reference in a new issue