Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

overlay: optimize blit() to not perform a blit if the active item rect is empty. #2364

Merged
merged 1 commit into from Jul 2, 2016

Conversation

mkrautz
Copy link
Contributor

@mkrautz mkrautz commented Jun 25, 2016

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.

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 #1123

@mkrautz
Copy link
Contributor Author

mkrautz commented Jun 25, 2016

PTAL @hacst @Kissaki @fwaggle @Natenom

@mkrautz
Copy link
Contributor Author

mkrautz commented Jun 26, 2016

"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."

Should read:

"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"

@hacst
Copy link
Contributor

hacst commented Jul 1, 2016

LGTM

…t 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#1123
@mkrautz
Copy link
Contributor Author

mkrautz commented Jul 2, 2016

Fixed the commit message. Will land.

@mkrautz mkrautz merged commit 8272e48 into mumble-voip:master Jul 2, 2016
mkrautz added a commit that referenced this pull request Jul 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants