Destroy FBOs only on actual resize.

As a side effect, this means going to settings won't reset all FBOs
anymore.  The behavior can still be obtained by changing render resolution
or rendering mode.

This makes resizing the window faster on Windows, and resumes quicker from
pause.
This commit is contained in:
Unknown W. Brackets committed 2017-04-13 23:36:17 -07:00
1 parent 030f803002
commit 98ba7afa83
6 files changed
+27 -20

No files matched your search

+4 -6
View File
@@ -1150,11 +1150,8 @@ void FramebufferManagerGLES::PackDepthbuffer(VirtualFramebuffer *vfb, int x, int
void FramebufferManagerGLES::EndFrame() {
CHECK_GL_ERROR_IF_DEBUG();
if (resized_) {
// TODO: Only do this if the new size actually changed the renderwidth/height.
DestroyAllFBOs();
// Check if postprocessing shader is doing upscaling as it requires native resolution
const ShaderInfo *shaderInfo = 0;
const ShaderInfo *shaderInfo = nullptr;
if (g_Config.sPostShaderName != "Off") {
shaderInfo = GetPostShaderInfo(g_Config.sPostShaderName);
}
@@ -1183,7 +1180,9 @@ void FramebufferManagerGLES::EndFrame() {
PSP_CoreParameter().renderHeight = 272 * zoom;
}
UpdateSize();
if (UpdateSize() || g_Config.iRenderingMode == FB_NON_BUFFERED_MODE) {
DestroyAllFBOs();
}
resized_ = false;
#ifdef _WIN32
@@ -1192,7 +1191,6 @@ void FramebufferManagerGLES::EndFrame() {
ShowScreenResolution();
}
#endif
ClearBuffer();
DestroyDraw2DProgram();
SetLineWidth();
}