summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Bauman <jbauman@chromium.org>2013-10-29 16:03:11 -0700
committerJohn Bauman <jbauman@chromium.org>2013-10-29 16:03:11 -0700
commit0f0edf94bfe1fc28979b0d12747a900164bb966a (patch)
treeb28d77dd0c034c4f16f5a80331b23768208c86ae
parentb4e0003292f829a0f88a14df4b02a785fcf2b45f (diff)
downloadangle_dx11-0f0edf94bfe1fc28979b0d12747a900164bb966a.tar.gz
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
-rw-r--r--src/libEGL/Surface.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libEGL/Surface.cpp b/src/libEGL/Surface.cpp
index 30f85cda..01b40171 100644
--- a/src/libEGL/Surface.cpp
+++ b/src/libEGL/Surface.cpp
@@ -311,6 +311,13 @@ bool Surface::checkForOutOfDateSwapChain()
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);