Repository navigation
Build test apps without SDL, so tests that build them run in parallel - #724
Merged
Merged
Conversation
|
📦 Development package |
|
✅ Development package validation passed on all platforms. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TestApp.CreateBuilder()started SDL, which belongs to the whole process: one event queue,SDL_Quitfor every subsystem, global hints and a main-thread rule. So only one test app could exist at a time, and every test that built one was[NonParallelizable]. A test app now never starts SDL, and tests that build apps run in parallel.Windows
Windowis platform-neutral and abstract. The newNativeWindowholds the SDL window, andSwapchainWindowand headless mode'sOffscreenWindowderive from it.StubWindowis a window without a platform, on one display of 1024 × 768 at scale 1, as SDL's dummy driver reports it. A new size raisesResolutionChangedin the next frame, before any update.WindowRegistrykeeps windows only and matches SDL window IDs on native windows.Services
IEventSource.EventServiceis the SDL one, andStubEventSourceraises the stub windows' size changes.PixelyAppBuilder.Build()registersPlatformInfo, the cursor, clipboard, platform settings and display services, and the event source only when nothing has registered them.AddGpuServicesdoes the same for the font system, andRegisterAudiofor the audio system.StubCursorService,StubClipboardService,StubPlatformSettings,StubDisplayService,StubFontSystemandStubAudioSystem.Cursorhas an internal owner interface, and the cursor checks are shared by both cursor services.Audio
AudioSystemis an abstract base with internal*Coremethods, asGpuDeviceis.SdlAudioSystemandSdlAudioStreamhold the SDL_mixer code.StubAudioSystemreads no file and plays nothing. A source keeps the state SDL_mixer gives it, a sound plays until it is stopped or the test callsFinish, andLoadedPathtells which sound a clip is.Differences from SDL's dummy driver
In a test app:
docs/testing.mdlists them, andDECISIONS.mdhas the entry.Testing
SDL_WasInitstays 0) through build, frames, input, fonts, audio and disposal[NonParallelizable].[Explicit]and did not run locally