Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikkel Krautz <mikkel@krautz.dk>2016-07-02 13:18:57 +0300
committerMikkel Krautz <mikkel@krautz.dk>2016-07-02 13:18:57 +0300
commit8272e4872fd7edf3cd40f3ab90f4383ed1c784f0 (patch)
treebd1f730ce4c2ae051995e3348a71b63a06c38615 /overlay/d3d10.cpp
parentdaba32f68eeb9ab03f30364021ada3d5f66bd00e (diff)
overlay: optimize blit() to not perform a blit if the active item rect is empty.
It seems that in EVE Online, if we update our overlay texture but do not draw to the screen, the texture mapping is never freed, until we begin drawing again. I do not know enough D3D11 to know why. Instead, this commit works around the issue by introducing a fully legal optimization to the blit() method: If the rect of active overlay elements is empty (that is, the screen is empty), do not perform a blit at all. The change also introduces an extra call to blit upon receiving OVERLAY_MSG_ACTIVE. That message is the message that signals that the rect of active elements has changed. We need to blit here to ensure we redraw correctly once the rect of active overlay elements changes. Fixes mumble-voip/mumble#1123
Diffstat (limited to 'overlay/d3d10.cpp')
-rw-r--r--overlay/d3d10.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/overlay/d3d10.cpp b/overlay/d3d10.cpp
index 4494b8256..6b91ebed0 100644
--- a/overlay/d3d10.cpp
+++ b/overlay/d3d10.cpp
@@ -109,7 +109,7 @@ void D10State::blit(unsigned int x, unsigned int y, unsigned int w, unsigned int
ods("D3D10: Blit %d %d %d %d", x, y, w, h);
- if (! pTexture || ! pSRView)
+ if (! pTexture || ! pSRView || uiLeft == uiRight)
return;
D3D10_MAPPED_TEXTURE2D mappedTex;