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
Member

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

This comment has been minimized.

Copy link
Member Author

commented Jun 25, 2016

@mkrautz

This comment has been minimized.

Copy link
Member Author

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

This comment has been minimized.

Copy link
Member

commented Jul 1, 2016

LGTM

overlay: optimize blit() to not perform a blit if the active item rec…
…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 #1123

@mkrautz mkrautz force-pushed the mkrautz:overlay-optimize-blit branch from 593e2e4 to 8272e48 Jul 2, 2016

@mkrautz

This comment has been minimized.

Copy link
Member Author

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
Projects
None yet
2 participants
You can’t perform that action at this time.