Disable automatically resizing swapchain if window is iconified
The size of the window is changed if the window is iconified, but that change should be ignored.
BUG=
R=shannonwoods@chromium.org
Review URL: https://codereview.appspot.com/19460043
diff --git a/src/libEGL/Surface.cpp b/src/libEGL/Surface.cpp
index 30f85cd..01b4017 100644
--- a/src/libEGL/Surface.cpp
+++ b/src/libEGL/Surface.cpp
@@ -311,6 +311,13 @@
int clientHeight = client.bottom - client.top;
bool sizeDirty = clientWidth != getWidth() || clientHeight != getHeight();
+ if (IsIconic(getWindowHandle()))
+ {
+ // The window is automatically resized to 150x22 when it's minimized, but the swapchain shouldn't be resized
+ // because that's not a useful size to render to.
+ sizeDirty = false;
+ }
+
if (mSwapIntervalDirty)
{
resetSwapChain(clientWidth, clientHeight);