summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-02-10LibGfx+icc: Stringify known signatureType valuesNico Weber
2023-02-10DisplaySettings: Capitalize fallback display mode when loading settingsJulian Offenhäuser
This setting was capitalized a while ago, except for this place where we fall back to "[C]center". This caused a crash in MonitorWidget.
2023-02-10LibWeb: Use device pixels for transform rect of stacking contextAliaksandr Kalenik
2023-02-10LibPDF: Fix glyph sizing bug that caused incorrect spacingJulian Offenhäuser
When loading OpenType fonts, either as a replacement for the standard 14 fonts or an embedded one, we previously passed the font size as the _point_ size to the loader class. The difference is quite subtle, being that Gfx::ScaledFont uses the optional dpi parameter to convert the input from inches to pixels. This meant that our glyphs were exactly 1.333% too large, causing them to overlap in places.
2023-02-10LibPDF: Use more appropriate standard 14 replacement fontsJulian Offenhäuser
The mapping of standard font to replacement now looks like this: Times New Roman -> Liberation Serif Courier -> Liberation Mono Helvetica, Arial -> Liberation Sans
2023-02-10Base: Add LiberationSans and LiberationMono fontsJulian Offenhäuser
These will be used by LibPDF as replacements for Helvetica/Arial and Courier.
2023-02-10LibGfx+icc: Read chromaticityTagNico Weber
This isn't terribly useful. But some profiles, for example the ones at https://vpifg.com/help/icc-profiles/, do contain this tag and it seems nice to be able to dump it, just for completeness. I haven't seen any files that contain a phosphor or colorant type different from "Unknown", even for the Rec2020 profile on that page. (It has x,y coordinates that match the values required for Rec2020, but it doesn't set the phosphor or colorant type to that.)
2023-02-10LibGfx+icc: Read viewingConditionsTypeNico Weber
Not terribly useful in practice either and also mostly for completionism. But with this, we can dump all types present in Lightroom Classic-exported jpegs :^)
2023-02-10LibGfx+icc: Read measurementTypeNico Weber
Also not terribly useful in practice and mostly for completionism. Lightroom Classic-exported jpegs contain this type in their ICC data.
2023-02-10CI: Add script to post mastodon toots for commits on masternetworkException
This patch adds the toot-commits script (mirroring tweet-commits), posting new commits on the master branch to https://serenityos.social/@commits.
2023-02-10LibWeb: Add missing GCPtr.h includes to Fetch headersTimothy Flynn
These are missing in most Fetch headers, and clangd is (rightfully) very loud about it on a few of these.
2023-02-10AK: Provide `is_errno` for Kernel ErrorsTim Schumacher
It wouldn't make much sense on its own (as the Kernel only has errno Errors), but it's an easy fix for not having to ifdef away every single usage of `is_errno` in code that is shared between Userland and Kernel.
2023-02-10AK: Allow explicitly copying Errors in the KernelTim Schumacher
2023-02-10AK: Fix a linting issue in `Error.h`Tim Schumacher
I'm not sure why, but `clang-format` gets unhappy if we touch the adjacent line.
2023-02-10AK: Disallow returning of string literals for errors in kernel codeLiav A
This code should not be used in the kernel - we should always propagate proper errno codes in case we need to return those to userland so it could decode it in a reasonable way.
2023-02-10LibEDID: Return proper errno codes for kernel codeLiav A
2023-02-10AK: Add a new method to propagate errno while printing errors in KernelLiav A
This new method is meant to be used in both userspace and kernel code. The idea is to allow printing of a verbose message and then returning an errno code which is the proper mechanism for kernel code because we should almost always assume that such error will be propagated back to userspace in some way, so the userspace code could reasonably decode it. For userspace code however, this new method is meant to be a simple wrapper for Error::from_string_view, because for most invocations, it's much more useful to have a verbose & literal error than a errno code, so we simply ignore that errno code completely in such context.
2023-02-10Kernel: Return proper errno codes from Coredump::write_regions methodLiav A
2023-02-10Kernel/Net: Propagate proper errno codes from determine_network_deviceLiav A
Returning literal strings is not the proper action here, because we should always assume that error could be propagated back to userland, so we need to keep a valid errno when returning an Error.
2023-02-10Kernel/VirtIOGPU: Propagate proper errno codes from query_and_set_edidLiav A
Returning literal strings is not the proper action here, because we should always assume that error could be propagated back to userland, so we need to keep a valid errno when returning an Error.
2023-02-10AK: Disallow implicitly copying Error and ErrorOr instancesTimothy Flynn
In the rare cases that a copy is actually needed, the Error::copy factory will suffice.
2023-02-10AK+Everywhere: Do not implicitly copy variables in TRY macrosTimothy Flynn
For example, consider cases where we want to propagate errors only in specific instances: auto result = read_data(); // something like ErrorOr<ByteBuffer> if (result.is_error() && result.error().code() != EINTR) continue; auto bytes = TRY(result); The TRY invocation will currently copy the byte buffer when the expression (in this case, just a local variable) is stored into _temporary_result. This patch binds the expression to a reference to prevent such copies. In less trival invocations (such as TRY(some_function()), this will incur only temporary lifetime extensions, i.e. no functional change.
2023-02-10Everywhere: Remove needless copies of Error / ErrorOr instancesTimothy Flynn
Either take the underlying objects with release_* methods or move() the instances around.
2023-02-10Kernel: Explicitly copy Plan9FS read errors to registered delegatesTimothy Flynn
2023-02-10AK: Add an explicit Error factory to copy an existing errorTimothy Flynn
As of now, there is a default copy constructor on Error. A future commit will make this non-public to prevent implicit copies, so to prepare for that, this adds a factory for the few cases where a copy is really needed.
2023-02-10LibGfx: Remove the optional Error member from QOI's decoder contextTimothy Flynn
2023-02-10Kernel: Store socket errors as errno codes rather than ErrorOr valuesTimothy Flynn
2023-02-10Spreadsheet: Don't recalculate column sizes when no data has changedTim Ledbetter
Use the Model::UpdateFlag::DontResizeColumns option when performing a model update where no data has been changed. This improves navigation performance on large spreadsheets.
2023-02-10LibGUI: Add a DontResizeColumns option to Model::UpdateFlagTim Ledbetter
This allows an application to signal that column sizes do not need to be recalculated for a given model update.
2023-02-10LibGUI: Speed up Variant string conversion for string dataTim Ledbetter
Add a fast path to Variant::to_deprecated_string() to return a copy if the underlying data is of type DeprecatedString. This improves the performance of models with a lot of string data.
2023-02-09SoundPlayer: Fix logic bug in bars visualizationJulian Offenhäuser
When calculating bar height, we clamp our values to the maximum vertical height of the widget minus a margin. When the window was resized such that the widget got smaller than this margin however, our maximum height became negative. This caused a crash in clamp().
2023-02-09LibJS+LibWeb: Convert string view PrimitiveString instances to StringTimothy Flynn
First, this adds an overload of PrimitiveString::create for StringView. This overload will throw an OOM completion if creating a String fails. This is not only a bit more convenient, but it also ensures at compile time that all PrimitiveString::create(string_view) invocations will be handled as String and OOM-aware. Next, this wraps all invocations to PrimitiveString::create(string_view) with MUST_OR_THROW_OOM. A small PrimitiveString::create(DeprecatedFlyString) overload also had to be added to disambiguate between the StringView and DeprecatedString overloads.
2023-02-09LibJS: Convert short string literal PrimitiveString instances to StringTimothy Flynn
2023-02-09LibJS+LibWeb: Convert empty PrimitiveString instances to StringTimothy Flynn
2023-02-09icc: Call video_full_range_flag_to_string()Nico Weber
2023-02-09LibVideo: Add a video_full_range_flag_to_string() functionNico Weber
2023-02-09LibVideo: Rename "ColorRange" to "VideoFullRangeFlag"Nico Weber
That matches the terminology used in ITU-T Rec. H.273, PNG's cICP chunk, and the ICC cicpTag. Also change the enum values to match the values in the spec -- 0 means "not full range" and 1 means "full range". (For now, keep the "Unspecified" entry around, and give it value 2. This value is not in the spec.) No intended behavior change.
2023-02-09Revert "Meta: Automatically select best apt mirror"Timothy Flynn
This reverts commit b0606d90f0da2fd2651768d1e250a692e3c92abf. This seems to prevent libegl-mesa0 from being installed (which for some reason isn't failing the Azure jobs - the failure seen later is that ccache is not installed).
2023-02-08Piano: Show a progress window when exporting WAVkleines Filmröllchen
This exposes that the export is pretty slow, but it's much nicer than having the GUI lock up for 20s :^)
2023-02-08LibGfx: Make checkerboard patterns static when panningTim Ledbetter
Previously checkerboard patterns were anchored to the top left of the bitmap they were being drawn into. This makes the transparency grid in PixelPaint static relative to the canvas when panning.
2023-02-08VideoPlayer/LibVideo: Seek accurately when scrolling in the seek barZaggy1024
Fast seeking does not work correctly when seeking in small increments, so it is necessary to use accurate seeking when using certain actions. The PlaybackManager has been changed to accept the seek mode as a parameter to `seek_to_timestamp` to facilitate this. This now means that it no longer has to track a seek mode preference.
2023-02-08LibVideo/Matroska: Stop skipping a cue when seeking forwardZaggy1024
This would cause seeks where the approximate starting cue index was one cue before the optimal cue to not change the sample iterator position. Fixing this issue improves accurate seek speeds significantly.
2023-02-08LibVideo/Matroska: Add debug logging for seeking to cuesZaggy1024
2023-02-08LibVideo: Pass the current sample to demuxers to lazily seek betterZaggy1024
In cases where the PlaybackManager's earliest buffered or displayed sample is closer to the seek target than the demuxer's chosen keyframe, we don't want to seek at all. To enable this, demuxers now receive an optional parameter with the earliest timestamp that the caller can still access. The demuxer in turn returns an optional to indicate when a seek was not needed, which allows PlaybackManager to avoid clearing its queue and re-decoding frames.
2023-02-08LibVideo/PlaybackManager: Organize playback states into virtual classesZaggy1024
Storing playback states in virtual classes allows the behavior to be much more clearly written. Each `PlaybackStateHandler` subclass can implement some event-handling functions to model their behavior, and has functions to change its parent PlaybackManager's state to any other state. This will allow expanding the functionality of playback in the future, for example to allow skipping a single frame forward/backward.
2023-02-08LibVideo: Rename Status -> State in `PlaybackStatusChangeEvent` classZaggy1024
A bit of a bikeshed, but status sounds more like a result of an action, and state sounds more accurate to what the `PlaybackManager` does. The previous and current state fields of the `PlaybackStateChangeEvent` are now removed, since they were unused (for now). This is a lead-up to the refactoring of VideoPlaybackManager to make that diff more legible.
2023-02-08LibGfx+icc: Implement half of lutAToBType and lutBToATypeNico Weber
These are among the permitted tag types of ATo0Tag and BToA0Tag, which are among the required tags of most profiles. They are the last permitted tag types for those profiles (the other are lut8Type or lut16Type, which are already implemented). They are pretty chonky types though, so this only implements support for the E matrix and the CLUT. Support for the various curves will be in a future PR.
2023-02-08LibGfx: Use size_t instead of unsigned in ICC loopsNico Weber
2023-02-08PixelPaint: Correct move tool alignment with the layer boundaryTim Ledbetter
Previously, the move tool outline could "wobble" relative to the layer boundary. This caused the layer boundary to appear and disappear when zooming. With this commit, the layer boundary is always drawn behind the move tool outline.
2023-02-08PixelPaint: Use image coordinates for bucket tool bounds checkingTim Ledbetter
Previously, layer coordinates were being used to check whether the bucket tool was within the bounds of the current selection, rather than image coordinates.