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

Conflicts:

	src/libEGL/Surface.cpp

Change-Id: Ia5053a2f210b29d39551796de3d8a394d7897ac9
Reviewed-on: https://chromium-review.googlesource.com/178997
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Tested-by: Shannon Woods <shannonwoods@chromium.org>
diff --git a/src/libEGL/Surface.cpp b/src/libEGL/Surface.cpp
index e190d1d..12f8dfd 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;
+    }
+
     bool wasDirty = (mSwapIntervalDirty || sizeDirty);
 
     if (mSwapIntervalDirty)