Commit Graph

32182 Commits

Author SHA1 Message Date
Ben Wiederhake
95c21977b4 LookupServer: Avoid unnecessary copies 2022-01-01 15:40:39 +01:00
Ben Wiederhake
182a85c895 LibSQL: Avoid unnecessary copies in Heap 2022-01-01 15:40:39 +01:00
Ben Wiederhake
5c4b2e8447 LibLine: Avoid unnecessary copies in Editor 2022-01-01 15:40:39 +01:00
Ben Wiederhake
13acf603d8 LibGUI: Avoid unnecessary copies in FileIconProvider 2022-01-01 15:40:39 +01:00
Stephan Unverwerth
b7c0c32f24 LibSoftGPU: Add option to render a debug overlay
This displays statistics regarding frame timings and number of pixels
rendered.

Timings are based on the time between draw_debug_overlay() invocations.
This measures actual number of frames presented to the user vs. wall
clock time so this also includes everything the app might do besides
rendering.

Triangles are counted after clipping. This number might actually be
higher than the number of triangles coming from LibGL.

Pixels are counted after the initial scissor and coverage test. Pixels
rejected here are not counted. Shaded pixels is the percentage of all
pixels that made it to the shading stage. Blended pixels is the
percentage of shaded pixels that were alpha blended to the color buffer.

Overdraw measures how many pixels were shaded vs. how many pixels the
render target has. e.g. a 640x480 render target has 307200 pixels. If
exactly that many pixels are shaded the overdraw number will read 0%.
614400 shaded pixels will read as an overdraw of 100%.

Sampler calls is simply the number of times sampler.sample_2d() was
called.
2022-01-01 15:09:21 +01:00
Stephan Unverwerth
fe36edf6ae LibSoftGPU: Put all constexpr config options into Config.h 2022-01-01 15:09:21 +01:00
circl
4b40d2cc07 chown+chgrp: Add --no-dereference option
This option will change the ownership of the symlink rather than the
file it points to.
2022-01-01 15:08:49 +01:00
circl
63760603f3 Kernel+LibC+LibCore: Add lchown and fchownat functions
This modifies sys$chown to allow specifying whether or not to follow
symlinks and in which directory.

This was then used to implement lchown and fchownat in LibC and LibCore.
2022-01-01 15:08:49 +01:00
Pankaj Raghav
344cfa0db4 Meta: Enable attaching NVMe storage devices to qemu
Add an option to enable NVMe storage device as the boot
drive.

To enable NVMe support, run the following:

$ SERENITY_NVME_ENABLE=1 Meta/serenity.sh run i686 root=/dev/nvme0n1
2022-01-01 14:55:58 +01:00
Pankaj Raghav
e99fafb683 Kernel/NVMe: Add initial NVMe driver support
Add a basic NVMe driver support to serenity
based on NVMe spec 1.4.

The driver can support multiple NVMe drives (subsystems).
But in a NVMe drive, the driver can support one controller
with multiple namespaces.

Each core will get a separate NVMe Queue.
As the system lacks MSI support, PIN based interrupts are
used for IO.

Tested the NVMe support by replacing IDE driver
with the NVMe driver :^)
2022-01-01 14:55:58 +01:00
Pankaj Raghav
602b35aa62 Kernel: Add DMA allocate functions that are TRY-able
Add DMA allocate buffer helper functions in MemoryManager.
2022-01-01 14:55:58 +01:00
Filiph Sandström
8489388e75 Themes: Add Cupertino theme
This theme is used to showcase the new features.
2022-01-01 14:54:16 +01:00
Filiph Sandström
8a1d77f65c LibGfx: Add window border/title theming options
This commit adds support the following properties to theming:
Flags:
  - IsTitleCenter: true if the title should be centered.
Metrics:
  - BorderThickness: The border width.
  - BorderRadius: The border corner radius.
2022-01-01 14:54:16 +01:00
Conor Byrne
14b2656107 HackStudio: Use String instead of LexicalPath
LexicalPath is a 'heavier' object than a String that is mainly used for
path parsing and validation, we don't actually need any of that in
GitRepo and its related files, so let's move to String :^)

I've also done some east-const conversion in the files that I was
editing for the string change.
2022-01-01 14:47:23 +01:00
Conor Byrne
4cfc992125 HackStudio: Add new multiline commit dialog
This new commit dialog features multi-line input and a line and column
indicator. A great improvement over the last one, if you ask me! :^)
2022-01-01 14:47:23 +01:00
Conor Byrne
e92b6047ad HexEditor: Port HexEditor to LibMain 2022-01-01 14:47:15 +01:00
Daniel Bertalan
ad57289307 Tests/LibCore: Add regression test for the read_until_any_of OOB read 2022-01-01 14:44:02 +01:00
Daniel Bertalan
7fdf4004de LibCore: Fix OOB read in Stream::BufferedSeekable::read_until_any_of
If we do not decrement `m_buffered_size` whenever we read data from the
buffer, we end up saying that there are more lines available when we
reach the end of file. This bug caused callers to read garbage data.

This also fixes an incorrect condition in an if statement. The separator
candidate is searched for in `remaining_buffer`, so the separator's
length should be compared against that.
2022-01-01 14:44:02 +01:00
Kenneth Myhra
22c27e1ba9 fgrep: Port fgrep to LibMain 2022-01-01 14:40:41 +01:00
Kenneth Myhra
8aafe6cd1f errno: Port to LibMain 2022-01-01 14:40:41 +01:00
Kenneth Myhra
2e0f53c25d du: Port to LibMain
This ports 'du' utility to LibMain. Also moves to use StringView and
StringView literals more instead of raw C strings.
2022-01-01 14:40:41 +01:00
Tobias Christiansen
3528563e3d PixelPaint: Move all filters into the Filter Gallery 2022-01-01 14:38:59 +01:00
Tobias Christiansen
f2feebc6f6 PixelPaint: Expand Filter Gallery to know how to apply filters 2022-01-01 14:38:59 +01:00
Tobias Christiansen
ddaf496aa0 PixelPaint: Make the ImageEditor known throughout the Filter Gallery 2022-01-01 14:38:59 +01:00
Tobias Christiansen
f47026b1d6 PixelPaint: Add Filter Gallery Dialog to the Filter Menu
This patch adds the bare bones of the new Filter Gallery.
For now, only the gml and the basic layout got added, a fairly boringw
indow pops up when "Filter Gallery" is called.

The code for the Model used by the TreeView is taken in large parts from
HackStudio's VariableModel.
2022-01-01 14:38:59 +01:00
networkException
b46ea5158d WindowsServer+LibGUI: Avoid getting color under cursor outside screen
This patch fixes a crash in ColorPicker caused by the ColorSelectOverlay
trying to request the color for a pixel outside the screen rect.
2022-01-01 14:32:11 +01:00
Conor Byrne
8515d7d5ab LibC: Implement `flockfile and funlockfile`
To do this, we must set the type attribute when initializing a FILE to
``__PTHREAD_MUTEX_RECURSIVE``.
2022-01-01 09:50:32 +00:00
Brandon
aa0db4e4b0 Base: Add Russian keymap
Add a Russian keymap file
2022-01-01 06:42:14 +00:00
Conor Byrne
2042a4d1e1 VideoPlayer: Port VideoPlayer to LibMain 2022-01-01 04:28:34 +00:00
Lady Gegga
5cfbaad0a5 Base: Add Supplemental Symbols and Pictographs to Katica Regular 10
1F930, 1F938, 1F941, 1F942, 1F945, 1F951, 1F95A, 1F964, 1F98B, 1F9DC,
1F9DE, 1F9E8
https://www.unicode.org/charts/PDF/U1F900.pdf
2022-01-01 07:48:48 +03:30
Lady Gegga
478271dd11 Base: Add Geometric Shapes Extended to font Katica Regular 10
https://www.unicode.org/charts/PDF/U1F780.pdf
1F785, 1F786, 1F787, 1F788, 1F789, 1F78A, 1F78B, 1F78E, 1F78F, 1F790,
1F791, 1F792, 1F793, 1F794, 1F795, 1F796
2022-01-01 07:48:48 +03:30
Lady Gegga
61d4e4955e Base: Add Transport and Map Symbols to font Katica Regular 10
1F6C8, 1F6D2
https://www.unicode.org/charts/PDF/U1F680.pdf
2022-01-01 07:48:48 +03:30
Lady Gegga
613edc75b7 Base: Add Emoticons to font Katica Regular 10
1F600, 1F603, 1F606, 1F60E, 1F60F, 1F610, 1F611, 1F615, 1F626, 1F641,
1F642, 1F643
https://www.unicode.org/charts/PDF/U1F600.pdf
2022-01-01 07:48:48 +03:30
Lady Gegga
1c5cb30b80 Base: Add Misc. Symbols and Pictographs to font Katica Regular 10
1F50C, 1F50D, 1F50E, 1F523, 1F524, 1F582, 1F583, 1F5AF, 1F5B0, 1F5B1,
1F5B2, 1F5B4, 1F5B5, 1F5D5, 1F5E8, 1F5E9, 1F5EA, 1F5EB
https://www.unicode.org/charts/PDF/U1F300.pdf
2022-01-01 07:48:48 +03:30
Lady Gegga
7f361aa7e5 Base: Add Dingbats to font Katica Regular 10
2780, 2781, 2782, 2783, 2784, 2785, 2786, 2787, 2788, 2789,
278A, 278B, 278C, 278D, 278E, 278F, 2790, 2791, 2792, 2793
https://www.unicode.org/charts/PDF/U2700.pdf
2022-01-01 07:48:48 +03:30
Lady Gegga
341796c144 Base: Add Chinese characters to font Katica Regular 10
6761, 6762, 4EF0, 4EFA, 4EFB, 4EFC, 4EF4, 4EF2, 4F55, 4F54,
4F43, 4F44, 4F42, 4F46, 4F40, 4ED6, 540E, 5410, 884C, 8840,
8841, 4EE5, 4EE6, 4EE7, 4EE8, 4EE9, 4EEA, 4F1A, 4F1B, 4F1C,
4F1D, 4F1E, 4F1F, 672C, 672B, 672A, 4E3A, 4E39, 4E38, 6240,
5BF9, 5BF8, 793E, 5E94, 5408
https://www.unicode.org/charts/PDF/U4E00.pdf
2022-01-01 07:48:48 +03:30
Lady Gegga
aadc60fd60 Base: Adjust 81EA in font Katica Regular 10
81EA https://www.unicode.org/charts/PDF/U4E00.pdf
2022-01-01 07:48:48 +03:30
drblah
b6ba0f9fad Kernel: Update E1000 link state using interrupt
Calls to link_up() in the E1000 driver would read the link state
directly from the hardware on every call. This had negative
performance impact in high throughput situations since link_up()
is called every time an IP packet's route is resolved.

This patch takes inspiration from the RTL8139 network adapter where
the link state is stored in a bool and only updated when the hardware
generates an interrupt related to link state change.

After this change I measured a ~9% increase in TCP Tx throughput
using:
cat /dev/zero | nc <host_IP> <host_port> from the Serenity VM to my
host machine
2021-12-31 15:48:16 +01:00
Linus Groh
d7f6635d55 LibJS: Add missing undefined fallback to IfStatement completions
Also add spec comments.
2021-12-31 15:39:25 +01:00
Linus Groh
a6476ad61f test-wasm: Convert WebAssemblyModule::create() to ThrowCompletionOr
This exposed a missing exception check in parseWebAssemblyModule(),
which could throw but still return a normal completion (which currently
works as we check VM::exception() at the right point, but breaks when
moving everything to exceptions).
2021-12-31 15:01:16 +01:00
Conor Byrne
faad7a3ed1 LibDiff: Fix error when parsing a 'new' hunk location
If the location started at 0, and / or the length was 0, it would
originally turn out to be a location of { -1, -1 } when LibDiff was
finished parsing, which was incorrect.

To fix this, we only subtract 1 if `start` or `length` isn't 0.
2021-12-31 14:12:54 +01:00
Conor Byrne
507ad1954f HackStudio: Fix crash when clicking unstaged files
In certain cases, an index might be invalid in the unstaged files view.
We must check if this index is valid before attempting to read the
index's data.
2021-12-31 14:12:54 +01:00
davidot
c0a3b1467c LibJS: Fix the Now.plainDateTime in case they go over a year boundary
Since years don't have a constant amount of seconds because they can be
leap years no constant will work in all cases. We now test a timezone in
both the positive and negative direction and check that at least one
worked. Assuming years are at least 2 days long this will always pass
at least one test.
2021-12-31 12:26:26 +01:00
davidot
c296df6b58 LibJS: Convert to_reference() to ThrowCompletionOr 2021-12-31 00:03:20 +01:00
davidot
a24df37713 LibJS: Convert resolve_this_binding() to ThrowCompletionOr
Also add spec comments.
2021-12-31 00:03:20 +01:00
Emanuele Torre
dc03529ffd LibJS: Fix spec comment in Temporal::PlainDate::balance_iso_date()
This matches the text of the spec, and is more correct since the
variable is being updated, not defined it.

See: https://github.com/tc39/proposal-temporal/commit/5ab1822

---

I also changed `test_year += 1` to `test_year++` for consistency with
step 11.c that has the same description.
2021-12-30 23:59:40 +01:00
Ali Mohammad Pur
783e27f8f9 Shell: Make redirection errors raise ShellErrors
Naturally, this means that a command with a failing redirection will
not start, and so will terminate the pipeline (if any).
This also applies to the `exit` run when the shell is closed, fixing a
fun bug there as well (thanks to Discord user Salanty for pointing that
out) where closing the terminal (i.e. I/O error on the tty) with a
failing `exit` command would make the shell retry executing `exit` every
time, leading to an eventual stack overflow.
2021-12-31 02:19:45 +03:30
Ali Mohammad Pur
8de8a7766d LibCore: Add Core::System::setpgid() 2021-12-31 02:19:45 +03:30
Ali Mohammad Pur
ee46cee31f LibCore: Make Core::System::pipe2() available on Lagom
Note that this drops the flags on the floor if not on linux or serenity.
2021-12-31 02:19:45 +03:30
davidot
b303b8cf4e LibJS: Convert thrown exception to completion in binding initialization
This regressed in 676554d3 as it assumed to_reference() (already)
returned a completion type instead of putting the error in
vm.exception().
2021-12-30 20:14:13 +01:00