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

Texture speedups #6762

Merged
merged 20 commits into from Jun 10, 2022
Merged

Texture speedups #6762

merged 20 commits into from Jun 10, 2022

Conversation

mesilliac
Copy link
Contributor

Pulled out the image caching stuff from new_rendering (excluding text caching).

Should bring performance back up to scratch in most cases.

@github-actions github-actions bot added Campaign (any) Deprecated tag, replaced with separate tags for each mainline campaign Editor Map/scenario editor issues. Help In-game Help functions Lua API Issues with the Lua engine and API. UI User interface issues, including both back-end and front-end issues. Units Issues that involve unit definitions or their implementation in the engine. labels Jun 10, 2022
mesilliac and others added 20 commits June 11, 2022 05:56
The game should work now on Wayland, although depending on SDL
version may not have any window decorations.
CVideo::set_clip -> draw::set_clip
CVideo::set_render_target -> draw::set_render_target
etc.
screen_pitch_microns is deprecated, and has been removed from the
GUI_SCALE_RESOLUTION macro in WML. The macro itself has been left in
place for potential future use.

The screen_pitch_microns variable has been left in place, but is now
a constant and will only ever return the default value equivalent to
96 DPI.
The texture-only code was missing huge sections, and otherwise a
direct duplication.

If it is desired that surfaces do not get cached when loading
textures, then an option should be added to get_surface to explicitly
disable caching.
Previously it was doing all sorts of things using surface operations.

This is a stop-gap measure. If possible, these operations should
eventually moved into graphics shaders.
Images are scaled when drawn.

Also introduced image::get_image_size() to return the size of an image
without returning the full surface or texture. It will still load and
cache the image if it can't find it in the cache.
Images are scaled when drawn.
This is under a new "image" logging domain. Most other log calls
in image:: were also moved to this domain.
These were not being meaningfully used.

Also removed code flushing image caches when zoom level changes.
This is not necessary now that images are scaled on demand.
@mesilliac mesilliac merged commit 0093d64 into wesnoth:master Jun 10, 2022
@mesilliac mesilliac deleted the texture_speedups branch June 10, 2022 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Campaign (any) Deprecated tag, replaced with separate tags for each mainline campaign Editor Map/scenario editor issues. Help In-game Help functions Lua API Issues with the Lua engine and API. UI User interface issues, including both back-end and front-end issues. Units Issues that involve unit definitions or their implementation in the engine.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants