Commit graph

14360 commits

Author SHA1 Message Date
Jelle Raaijmakers
7b0adee487 LibGfx+Overall: Remove is_null from Point, Rect and Size
Having a `Point`, `Rect` or `Size` claim it's `null` is silly. We have
`Optional<T>` for that. For `Point`, rename `is_null` to `is_zero` to
better reflect what we're testing. For `Rect` and `Size`, `is_null` is
removed outright.

Also, remove `is_empty` from `Point`. Points can't be empty.
2022-12-28 22:32:21 -05:00
Jelle Raaijmakers
d83f1eaeb2 LibWeb: Use Optional for previous SVG path control point
Previously, a control point at `(0, 0)` would have been considered
absent. USe `Optional<Gfx::FloatPoint>` instead.
2022-12-28 22:32:21 -05:00
Arda Cinar
598fcfca26 LibWeb: Make the atob JS function compliant with the spec
It is specified to use the "forgiving-base64" decoder instead of the
regular base64 decoder, which is slightly different
2022-12-28 21:15:02 +01:00
Nico Weber
50c6d133a9 LibGfx: Remove now-unneeded casts 2022-12-28 20:13:12 +00:00
Tom
bb062e50b0 LibWeb: Don't expand grid for {row,column} spans
Fixes a bug where when you had spans that that were bigger than the
grid, would create enough tracks to accomodate them. When a fixed
position is given, there should be at a minimum a row/column available
for the track. The span will be truncated if there is no space for it
later.
2022-12-28 15:04:58 +01:00
Tom
6e29f693f5 LibWeb: Refactor GridFormattingContext
For legibility, split up the run() function of the GridFormattingContext
into individual components.
2022-12-28 15:04:58 +01:00
Tom
0bbf7a1b54 LibWeb: Refactor should_skip_anonymous_text_runs
This same function was being copied in the {Flex,Grid}FormattingContext,
so unify them in the parent FormattingContext.
2022-12-28 15:04:58 +01:00
Andreas Kling
7b9ea3efde Kernel+Userland: Remove uses of the __i386__ compiler macro 2022-12-28 11:53:41 +01:00
Andreas Kling
79b623b52e LibC: Remove use of ARCH(I386) in sys/arch/aarch64/regs.h 2022-12-28 11:53:41 +01:00
Liav A
e1ee8f89f2 LibX86: Remove i686 support 2022-12-28 11:53:41 +01:00
Liav A
eca57006f6 LibCoredump: Remove i686 support 2022-12-28 11:53:41 +01:00
Liav A
1d26b46884 LibDebug: Remove i686 support 2022-12-28 11:53:41 +01:00
Liav A
a4c87fac56 LibELF+LibSymbolication: Remove i686 support 2022-12-28 11:53:41 +01:00
Liav A
92da98822a LibC: Remove i686 support 2022-12-28 11:53:41 +01:00
Liav A
85b453c2e4 Kernel+Userland: Remove dependency on i386-specific registers 2022-12-28 11:53:41 +01:00
Liav A
445b5e1e94 Userland: Remove i686 support 2022-12-28 11:53:41 +01:00
Nico Weber
782ab0a11f LibGfx: Read profile creation time from ICCProfile header 2022-12-27 15:58:39 -08:00
Nico Weber
bb1f6f71f1 LibC: Make timegm() force tm_isdst to 0
UTC is not affected by summer time, and the BSD manpage for timegm()
says "The tm_isdst [...] members are forced to zero by timegm()."
2022-12-27 15:58:39 -08:00
Nico Weber
d8867f8077 LibGfx: Start adding a class for handling ICC color profiles
For now, this checks the magic number and reads file version and
device class.
2022-12-27 07:44:37 -07:00
Nico Weber
19d3821354 LibVideo: Fix two comment typos 2022-12-27 07:44:37 -07:00
Jelle Raaijmakers
7d5839f793 LibDesktop: Do not quit screensaver on immediate mouse move
Let's delay this way of quitting the screensavers by 750ms. :^)
2022-12-27 12:38:08 +01:00
Jelle Raaijmakers
18b6bdb563 Demos+LibDesktop: Centralize screensaver logic
We have 3 demos with pretty similar window logic and quitting behavior
on user activity, so centralize that into `Desktop::Screensaver`.
2022-12-27 12:38:08 +01:00
Karol Kosek
8238f926fd LibArchive+Utilities: Port ZipOutputStream to Core::Stream 2022-12-27 07:24:07 +03:30
Nico Weber
c96e663b0a LibCompress: Add two missing return statements 2022-12-26 13:56:13 -05:00
Tom
9d5049230c LibWeb: Clamp {row,column} spans if outside of grid
A bug was found where grid items were being drawn outside of the grid if
the item had a large span and the grid was defined as having gaps
between the rows/columns.

This was caused by an erroneous calculation of the
{row,column}_{start,span} properties.
2022-12-26 16:02:48 +01:00
Timothy Flynn
ba86011fab LibWeb: Add missing return statement in an element scrolling error case 2022-12-26 09:56:22 -05:00
Stephan Unverwerth
2658351fa6 LibVirtGPU: Adopt rendering code from VirGLDemo 2022-12-26 09:39:20 +01:00
Stephan Unverwerth
1ec791fcd0 LibVirtGPU: Adopt device initialization code from VirGLDemo 2022-12-26 09:39:20 +01:00
Stephan Unverwerth
086c7c4c88 LibVirtGPU: Create and initialize device from file descriptor 2022-12-26 09:39:20 +01:00
Stephan Unverwerth
4b792cb7be LibVirtGPU: Replace magic values with command bitfields 2022-12-26 09:39:20 +01:00
Stephan Unverwerth
93b5af932e LibVirtGPU: Add utility header for command flag bitfields 2022-12-26 09:39:20 +01:00
Stephan Unverwerth
65a1ebcccf LibVirtGPU: Add enum for Gallium texture formats 2022-12-26 09:39:20 +01:00
Stephan Unverwerth
0993aba321 LibVirtGPU: Add length verification to append_create_shader() 2022-12-26 09:39:20 +01:00
Stephan Unverwerth
140338670a LibVirtGPU: Make depth and color clearing separate functions 2022-12-26 09:39:20 +01:00
Stephan Unverwerth
03884fad74 LibVirtGPU: Remove hard coded primitive type in append_draw_vbo() 2022-12-26 09:39:20 +01:00
Stephan Unverwerth
b5acfba487 LibVirtGPU: Improve append_set_framebuffer_state_no_attach()
Remove hardcoded framebuffer size and add argument verification.
2022-12-26 09:39:20 +01:00
Stephan Unverwerth
4a4aa23aed LibVirtGPU: Remove hardcoded size from append_viewport() 2022-12-26 09:39:20 +01:00
Stephan Unverwerth
7a2b9ad164 LibVirtGPU: Drop gl_ prefix from CommandBufferBuilder methods 2022-12-26 09:39:20 +01:00
Stephan Unverwerth
b220ed6b5c LibVirtGPU: Use c++ style casts in CommandBuilder 2022-12-26 09:39:20 +01:00
Stephan Unverwerth
44b2a746ca LibVirtGPU: Improve type safety of encode_command()
ObjectType is now passed as an enum instead of a plain number. The
underlying type for both ObjectType and VirGLCommand have been reduced
to u8 to make sure they fit in the encoded command. Command length is
verified to not overflow u16.
2022-12-26 09:39:20 +01:00
Stephan Unverwerth
ce57174802 LibVirtGPU: Make BindTarget an enum and move it into VirtGPU::Protocol 2022-12-26 09:39:20 +01:00
Stephan Unverwerth
51ac0d73a3 LibVirtGPU: Move VirGLDemo protocol code into VirtGPU namespace 2022-12-26 09:39:20 +01:00
Stephan Unverwerth
a95eea5ae2 LibVirtGPU: Add newlines between CommandBuilder methods 2022-12-26 09:39:20 +01:00
Stephan Unverwerth
255b12ea97 LibVirtGPU: Remove unnecessary BufferBuilder constructor deletion
Since there is a non-default constructor this line is not needed.
2022-12-26 09:39:20 +01:00
Stephan Unverwerth
a34998fb76 LibVirtGPU: Adopt virgl protocol files from VirGLDemo 2022-12-26 09:39:20 +01:00
Stephan Unverwerth
bd7931ff23 LibGPU+LibVirtGPU: Allow loading the driver and instantiating the device
This adds LibVirtGPU to the list of allowed drivers in LibGPU and adds a
factory method to create the device to libVirtGPU.
2022-12-26 09:39:20 +01:00
Stephan Unverwerth
c52abe0bea LibVirtGPU: Add a new GPU device that talks to our VirtIO-GPU driver
At this moment this only contains function stubs.
2022-12-26 09:39:20 +01:00
Stephan Unverwerth
3b2ded1d44 LibGPU+LibSoftGPU: Move size and pixel format information to GPU::Image
Size and format information are the same for every implementation and do
not need to be virtual. This removes the need to reimplement them for
each driver.
2022-12-26 09:39:20 +01:00
Timothy Flynn
4abafbbe3c LibIPC: Remove requirement that Variant types must begin with Empty
This is no longer required by the decoder.
2022-12-26 09:36:16 +01:00
Timothy Flynn
9b483625e6 LibIPC+Everywhere: Change IPC decoders to construct values in-place
Currently, the generated IPC decoders will default-construct the type to
be decoded, then pass that value by reference to the concrete decoder.
This, of course, requires that the type is default-constructible. This
was an issue for decoding Variants, which had to require the first type
in the Variant list is Empty, to ensure it is default constructible.

Further, this made it possible for values to become uninitialized in
user-defined decoders.

This patch makes the decoder interface such that the concrete decoders
themselves contruct the decoded type upon return from the decoder. To do
so, the default decoders in IPC::Decoder had to be moved to the IPC
namespace scope, as these decoders are now specializations instead of
overloaded methods (C++ requires specializations to be in a namespace
scope).
2022-12-26 09:36:16 +01:00