Merge pull request #6315 from unknownbrackets/framebuf-estimate

Avoid shrinking buffer w/h in throughmode
This commit is contained in:
Henrik Rydgård 2014-06-14 11:06:37 +02:00
commit 5f6c083a3e

View File

@ -869,8 +869,14 @@ void FramebufferManager::DoSetRenderFrameBuffer() {
// Update fb stride in case it changed
vfb->fb_stride = fb_stride;
v->format = fmt;
v->width = drawing_width;
v->height = drawing_height;
// In throughmode, a higher height could be used. Let's avoid shrinking the buffer.
if (gstate.isModeThrough() && (int)v->width < fb_stride) {
v->width = std::max((int)v->width, drawing_width);
v->height = std::max((int)v->height, drawing_height);
} else {
v->width = drawing_width;
v->height = drawing_height;
}
break;
}
}