summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-12-24LibGL+LibSoftGPU: Move rendering related code to LibSoftGPU libraryStephan Unverwerth
This introduces a new library, LibSoftGPU, that incorporates all rendering related features that formerly resided within LibGL itself. Going forward we will make both libraries completely independent from each other allowing LibGL to load different, possibly accelerated, rendering backends.
2021-12-24SoundPlayer: Add a keyboard shortcut 'M' to mute the playerElyse
This shortcut let us mute/unmute the player, but it still doesn't update the volume slider because the actual volume widget can't display a muted state.
2021-12-24SoundPlayer: Add 'mute' methods to PlayerElyse
These methods allow us to mute/unmute the player without needing to modify the volume level that it has.
2021-12-24AudioServer: Ignore 'muted' clients when computing the 'output mix'Elyse
2021-12-24AudioServer: Add a 'self_muted' state to each client connectionElyse
This new state will allow us to ignore muted clients when computing the 'output mix' in the Mixer.
2021-12-24AudioServer: Add 'mute' member and methods to ClientAudioStreamElyse
When computing the 'output mix', the Mixer iterates over all client audio streams and computes a 'mixed sample' taking into account mainly the client's volume. This new member and methods will allow us to ignore a muted client when computing that mix.
2021-12-24Everywhere: Refactor 'muted' to 'main_mix_muted' in all AudioConnectionsElyse
The 'muted' methods referred to the 'main mix muted' but it wasn't really clear from the name. This change will be useful because in the next commit, a 'self muted' state will be added to each audio client connection.
2021-12-24AudioServer/Mixer: Fix remaining samples underflowMax Trussell
The `m_remaining_samples` attribute was underflowing at the end of an audio stream. This fix guards against the underflow by only decrementing the attribute when it is greater than zero. I found this bug because the SoundPlayer userland application was not correctly detecting when an audio stream was completed. This was happening because the remaining samples being returned from the client audio connection was an underflowed 16 bit integer instead of zero.
2021-12-24SoundPlayer: Sync startup loop and show playlist settings in GUIMax Trussell
This fix syncs up the AudioPlayer's internal state for showing playlist information with the AudioPlayer's GUI. Before, if the AudioPlayer was opened with a playlist file (.m3u or .m3u8) it would automatically show the playlist information in the GUI and set the loop mode to playlist, but the menu options would be unchecked. In order to hide the playlist information, the menu option would then have to be toggled twice -- once on and again off.
2021-12-23HexEditor: Don't unnecessarily abbreviate variable namesArne Elster
There's enough line space to use readable variable names.
2021-12-23HexEditor: Make HexDocuments finalArne Elster
There's no reason as to why someone would inherit those, so might aswell make them final.
2021-12-23HexEditor: Scroll back to the top when opening another fileArne Elster
When a file is opened and scrolled to some position and the user opens another file, the current scroll position stays the same. That's disorienting. Therefore, when opening another file, scroll back to the top.
2021-12-23HexEditor: Stream input files instead of keeping them in memoryArne Elster
To support editing of large files it is an advantage to not load the entire file into memory but only load whatever is needed for display at the moment. To make it work, file access is abstracted into a socalled HexDocument, of which there two: a memory based and a file based one. The former can be used for newly created documents, the latter for file based editing. Hex documents now do track changes instead of the HexEditor. HexEditor only sets new values. This frees HexEditor of some responsibility.
2021-12-23LibFileSystemAccessClient: Allow custom access rights for open/saveArne Elster
There can be cases when one wants to open a file not just for reading but also for writing. It was already possible to have a custom open mode for request_file, now it is also possible through the open/save dialogs.
2021-12-23LibGUI: Add visual clue to Scrollbar gutterFrHun
This adds a visual clue to scrolling by clicking on the Scrollbar gutter. This gives the user a hint that scrolling will continue in the direction of the darkened gutter, until the mouse is released. It is inspired by very similar behavior on old windows.
2021-12-23Kernel: Move Multi Processor Parser code to a separate directoryLiav A
2021-12-23LibC: Allow multiple includes of `<assert.h>`Michel Hermier
ISO C requires in section 7.2: The assert macro is redefined according to the current state of NDEBUG each time that <assert.h> is included. Also add tests for `assert` multiple inclusion accordingly.
2021-12-23Meta: Allow to skip `#pragma once` checkMichel Hermier
Some headers migth need to be reentered multiple times (eg. <assert.h>) so a mecanism to skip that check is necessary.
2021-12-23LibGfx: Harden TTF parsing against fuzzersBrian Gianforcaro
Instead of asserting this edge case, bail out instead. Found by OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=42653
2021-12-23LibGfx: Fix incorrect error handling in ICOLoaderBrian Gianforcaro
This was found by OSS Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=42188
2021-12-23Kernel: Make msync return EINVAL when regions are too largeGuilherme Gonçalves
As a small cleanup, this also makes `page_round_up` verify its precondition with `page_round_up_would_wrap` (which callers are expected to call), rather than having its own logic. Fixes #11297.
2021-12-23FlappyBug: Make bitmap() methods return NonnullRefPtrscreator1creeper1
We are already storing these as NonnullRefPtrs, so we might as well make the functions return them as such.
2021-12-23FlappyBug: Propagate errors in Cloud classcreator1creeper1
Move-construct Cloud into the Game class to improve error handling.
2021-12-23FlappyBug: Propagate errors in Bug classcreator1creeper1
Move-construct Bug into the Game class to improve error handling.
2021-12-23FlappyBug: Reposition Game constructor in filecreator1creeper1
This will become important later on because the constructor will depend on the helper structs
2021-12-23FlappyBug: Make helper structs publiccreator1creeper1
They will need to be referenced by main later on.
2021-12-23Base: Add Elbasan characters to font Katica Regular 10Lady Gegga
10500-10527 https://www.unicode.org/charts/PDF/U10500.pdf
2021-12-24LibJS: Require 'T' prefix for ambiguous time-only stringsLinus Groh
This is a normative change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/514ede3
2021-12-23strace: Fix out-of-bounds read when formatting realpath()Daniel Bertalan
The actual length of the resulting string is encoded in the return value; treating the entire buffer as a string leads to reading uninitialized memory.
2021-12-23Kernel+UE+LibC: Store address as void* in SC_m{re,}map_paramsDaniel Bertalan
Most other syscalls pass address arguments as `void*` instead of `uintptr_t`, so let's do that here too. Besides improving consistency, this commit makes `strace` correctly pretty-print these arguments in hex.
2021-12-23LibELF: Use MAP_FIXED_NOREPLACE for address space reservationDaniel Bertalan
This ensures that we don't corrupt our address space if a non-PIE program's requested address space happens to coincide with memory we already use.
2021-12-23Kernel+UE: Add MAP_FIXED_NOREPLACE mmap() flagDaniel Bertalan
This feature was introduced in version 4.17 of the Linux kernel, and while it's not specified by POSIX, I think it will be a nice addition to our system. MAP_FIXED_NOREPLACE provides a less error-prone alternative to MAP_FIXED: while regular fixed mappings would cause any intersecting ranges to be unmapped, MAP_FIXED_NOREPLACE returns EEXIST instead. This ensures that we don't corrupt our process's address space if something is already at the requested address. Note that the more portable way to do this is to use regular MAP_ANONYMOUS, and check afterwards whether the returned address matches what we wanted. This, however, has a large performance impact on programs like Wine which try to reserve large portions of the address space at once, as the non-matching addresses have to be unmapped separately.
2021-12-23Kernel: Return EEXIST in VirtualRangeAllocator::try_allocate_specific()Daniel Bertalan
This error only ever gets propagated to the userspace if MAP_FIXED_NOREPLACE is requested, as MAP_FIXED unmaps intersecting ranges beforehand, and non-fixed mmap() calls will just fall back to allocating anywhere. Linux specifies MAP_FIXED_NOREPLACE to return EEXIST when it can't allocate, we now match that behavior.
2021-12-23UserspaceEmulator: Replace intersecting ranges if MAP_FIXED is specifiedDaniel Bertalan
This commit changes UserspaceEmulator to match the behavior that the kernel has since ce1bf37.
2021-12-23Kernel: Make major and minor numbers to be DistinctNumericsLiav A
This helps avoid confusion in general, and make constructors, methods and code patterns much more clean and understandable.
2021-12-23Profiler: Use AK::any_of for process filtrationHendiadyoin1
Equivalent to std::ranges::any_of as clang-tidy suggests.
2021-12-23Profiler: Always use FlyString const&'s in ProfileNode constructionHendiadyoin1
No need to copy and move them around, just to pass them as a `String const&` to the constructor. We still end up copying it to a normal String in the end though...
2021-12-23Profiler: Remove one else-after-returnHendiadyoin1
2021-12-23Profiler: Don't return constant copies of GUI::ModelIndexHendiadyoin1
2021-12-23Profiler: Add some implied auto qualifiersHendiadyoin1
2021-12-23LibX86: Mark two InstructionDescriptor functions as constHendiadyoin1
Thanks clang-tidy
2021-12-23UserspaceEmulator: Return ValueAndShadowReference& on operator=Hendiadyoin1
This is what normal assign operators do and what clang-tidy expects form us.
2021-12-23UserspaceEmulator: Avoid copies of non trivial types on invocationsHendiadyoin1
These include AK::String and X86::Instruction
2021-12-23UserspaceEmulator: Remove redundant private specifier in SoftCPU.hHendiadyoin1
2021-12-23UserspaceEmulator: Remove some else-after-returnsHendiadyoin1
2021-12-23UserspaceEmulator: Add some implied auto qualifiersHendiadyoin1
2021-12-23LibMain: Make "Runtime error" `warnln` redJames Puleo
Stealing what Andreas did for the `dbgln` output, I think it also looks nice inside of Terminal :^)
2021-12-23Kernel: Enter new address space before destroying old in sys$execve()Andreas Kling
Previously we were assigning to Process::m_space before actually entering the new address space (assigning it to CR3.) If a thread was preempted by the scheduler while destroying the old address space, we'd then attempt to resume the thread with CR3 pointing at a partially destroyed address space. We could then crash immediately in write_cr3(), right after assigning the new value to CR3. I am hopeful that this may have been the bug haunting our CI for months. :^)
2021-12-23Kernel: Don't honor userspace SIGSTOP requests in Thread::block()Andreas Kling
Instead, wait until we transition back to userspace. This stops userspace from being able to suspend a thread indefinitely while it's running in kernelspace (potentially holding some blocking mutex.)
2021-12-22Base: Add remaining Geometric Shapes to font Katica Regular 10Lady Gegga
25B2-25FF https://www.unicode.org/charts/PDF/U25A0.pdf