summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-12-27EchoServer: Port to LibMainSam Atkins
2021-12-27LibCore: Add ErrorOr wrappers to socket syscallsSam Atkins
These are all pretty simple so I thought I would add them all in one go: - socket() - bind() - listen() - accept() - accept4() - connect() - shutdown() - send() - sendmsg() - sendto() - recv() - recvmsg() - recvfrom() - getsockopt() - setsockopt() - getsockname() - getpeername() - socketpair()
2021-12-27LibJS: Implement console.time/timeLog/timeEnd() methodsSam Atkins
2021-12-27LibWeb: Add rudimentary styling to `<details>` and `<summary>`Sam Atkins
2021-12-27LibJS+WebContent+Browser+js: Implement console.group() methodsSam Atkins
This implements: - console.group() - console.groupCollapsed() - console.groupEnd() In the Browser, we use `<details>` for the groups, which is not actually implemented yet, so groups are always open. In the REPL, groups are non-interactive, but still indent any output. This looks weird since the console prompt and return values remain on the far left, but this matches what Node does so it's probably fine. :^) I expect `console.group()` is not used much outside of browsers.
2021-12-27LibJS+WebContent+js: Bring console.trace() to specSam Atkins
The spec very kindly defines `Printer` as accepting "Implementation-specific representations of printable things such as a stack trace or group." for the `args`. We make use of that here by passing the `Trace` itself to `Printer`, instead of having to produce a representation of the stack trace in advance and then pass that to `Printer`. That both avoids the hassle of tracking whether the data has been html-encoded or not, and means clients don't have to implement the whole `trace()` algorithm, but only the code needed to output the trace.
2021-12-27LibJS+WebContent+js: Bring console.assert() to specSam Atkins
2021-12-27LibJS+WebContent+js: Bring console.clear() to specSam Atkins
This is identical to before, since we don't have "group stacks" yet, but clear() now uses ThrowCompletionOr.
2021-12-27LibJS+WebContent+js: Bring console.count[Reset]() to specSam Atkins
The `CountReset` log level is displayed as a warning, since the message is always to warn that the counter doesn't exist. This is also in line with the table at https://console.spec.whatwg.org/#loglevel-severity
2021-12-27LibJS+WebContent+js: Reimplement console.log() and friends to specSam Atkins
This implements the Logger and Printer abstract operations defined in the console spec, and stubs out the Formatter AO. These are then used for the "output a categorized log message" functions.
2021-12-27WindowServer: Stop trying to close windows that are already destroyedSam Atkins
2021-12-27WindowServer: Use is_internal() instead of checking if the client existsSam Atkins
2021-12-27LibWeb: Implement CanvasRenderingContext2D.isContextLost()Linus Groh
Note that we don't implement the "context lost steps" yet, so this will always return the initial value (false).
2021-12-27LibWeb: Implement CanvasRenderingContext2D.reset()Linus Groh
2021-12-27LibWeb: Implement CanvasRenderingContext2D.restore()Linus Groh
2021-12-27LibWeb: Implement CanvasRenderingContext2D.save()Linus Groh
2021-12-27LibWeb: Encapsulate canvas drawing state in a structLinus Groh
This will allow us to easily add copies of the relevant canvas drawing state to a stack, and likewise replace the current drawing state with an entry from that stack.
2021-12-27LibWeb: Let canvas {fill,stroke}Style default to black, not transparentLinus Groh
I don't know if the original author simply missed this or thought the default color of Gfx::Color is black, but this meant that drawing on a canvas without explicitly setting a fillStyle or strokeStyle first would be drawn in transparent color and therefore be invisible. In the spec this is indicated by a small comment in the IDL definition: attribute ... strokeStyle; // (default black) attribute ... fillStyle; // (default black) I'm starting to question whether Gfx::Color actually *should* have a default constructor.
2021-12-27LibWeb: Fix copy/paste typo in CanvasRenderingContext2D::stroke_style()Linus Groh
This returned the fill style, not the stroke style!
2021-12-27LibSoftGPU: Mark `wrap_clamp` as [[maybe_unused]]Jesse Buhagiar
This was breaking the fuzzer build becaues the function is not used if the `CLAMP_DEPRECATED_BEHAVIOR` constexpr is not `true` during compile time.
2021-12-27Meta: Add link to awesome new meta-project from main website :^)Ben Wiederhake
2021-12-27Help: Fix memory leak given ambiguous man page title on command lineRummskartoffel
Given a command line with an ambiguous man page title, such as `$ Help uname`, Help would find and try to open all matching pages, leading to bad behavior such as a memory leak, flickering scrollbars, and eventually a crash due to OOM. This commit fixes the issue by making Help only open one page on startup.
2021-12-27Ports: Add Tux RacerJelle Raaijmakers
The patches take care of a port from SDL1 to SDL2 and replace the keyboard mapping logic, which will otherwise take a whopping 16 GiB of memory to run.
2021-12-27Ports: Add Mesa GLUJelle Raaijmakers
This is a dependency for Tux Racer, and is compiled against Serenity's LibGL.
2021-12-27LibSoftGPU: Clamp to edge instead of borderJelle Raaijmakers
According to the Khronos FAQ on texture edge sampling, the `GL_CLAMP` option was never implemented in hardware and as such, it was deprecated. A lot of applications and games depend on `GL_CLAMP` not really meaning `GL_CLAMP` but `GL_CLAMP_TO_EDGE`, so we introduce an option to toggle this behavior at compile-time.
2021-12-27LibGL: Implement `GL_QUAD_STRIP`Jelle Raaijmakers
It seems like we can render this with `GL_TRIANGLE_STRIP`. This makes the track marks in Tux Racer work.
2021-12-27LibGL: Remove stubbed border from `glTexImage2D`Jelle Raaijmakers
Providing anything else than `border == 0` is deprecated and should result in an invalid value error.
2021-12-27LibGL: Implement `GL_LINEAR_MIPMAP_NEAREST` supportJelle Raaijmakers
2021-12-27LibGL: Stub more API callsJelle Raaijmakers
These stubs are largely implemented the same: their API is exposed, but they print to the debug console and sometimes `TODO()`. These changes allow GLU and Tux Racer to build. Methods stubbed: * `glTexImage1D` * `glTexImage3D` * `glTexCoord2d(v)` * `glNormalPointer` * `glTexGen(d|f|i)` * `glTexGenfv`
2021-12-27LibGL: Stub lots of map-related methodsJelle Raaijmakers
This adds stubs for `glMap(1|2)(d|f)`, `glMapGrid(1|2)(d|f)`, `glEvalCoord(1|2)(d|f)`, `glEvalMesh(1|2)` and `glEvalPoint(1|2)`.
2021-12-27LibGL: Implement `glGetTexLevelParameteriv`Jelle Raaijmakers
2021-12-27LibGL: Implement `glRectf` and `glRecti`Jelle Raaijmakers
2021-12-27LibGL: Implement `glMultMatrixd`Jelle Raaijmakers
2021-12-27LibGL: Fix `GL_TRIANGLE_STRIP` rendering only half its trianglesJelle Raaijmakers
According to the documentation, we should switch around vertices every other triangle to prevent front-face culling from removing them. This allows Tux in Tux Racer to render correctly.
2021-12-27LibGL: Stub `glClear` support for stencil bufferJelle Raaijmakers
Previously, if the client supplied `GL_STENCIL_BUFFER_BIT`, `glClear` would return an error. Since it is a valid parameter, we now continue and report that this parameter is unimplemented instead.
2021-12-27LibGL: Uncrash `glMaterialf` on invalid inputJelle Raaijmakers
We should handle this in the context.
2021-12-27LibGL: Implement `glColor3/4dv`Jelle Raaijmakers
2021-12-27LibGL: Stub `GL_(UN)PACK_*` context parametersJelle Raaijmakers
Libraries like GLU depend on their memory initialization by requesting these parameters, so if we do not support them, segfaults will occur.
2021-12-27LibGL: Add glext.h and lots of new defines in gl.hJelle Raaijmakers
These constants are used by GLU and Tux Racer.
2021-12-27LibGL: Extract platform types to `glplatform.h`Jelle Raaijmakers
2021-12-27Ports: Compile SDL2_mixer with libmodplug supportJelle Raaijmakers
2021-12-27Ports/libuv: Fix build failure due to missing statfs() functionDaniel Bertalan
In 43c27e8, I mistakenly deleted the patch that removed calls to the statfs() function, which we do not have. This made building the port with a clean source tree fail. This commit changes `libuv` to use our statvfs() function instead.
2021-12-26Kernel: Scrub kmalloc slabs when allocated and deallocatedAndreas Kling
This matches the behavior of the generic subheaps (and the old slab allocator implementation.)
2021-12-26Kernel: Remove old SlabAllocator :^)Andreas Kling
This is no longer useful since kmalloc() does automatic slab allocation without any of the limitations of the old SlabAllocator. :^)
2021-12-26Kernel: Add FIXME about allocation waste in kmalloc slabheapAndreas Kling
2021-12-26Kernel: Remove all uses of MAKE_SLAB_ALLOCATED()Andreas Kling
Objects that were previously allocated via slab_alloc()/slab_dealloc() now go through kmalloc()/kfree_sized() instead.
2021-12-26Kernel: Use slab allocation automagically for small kmalloc() requestsAndreas Kling
This patch adds generic slab allocators to kmalloc. In this initial version, the slab sizes are 16, 32, 64, 128, 256 and 512 bytes. Slabheaps are backed by 64 KiB block-aligned blocks with freelists, similar to what we do in LibC malloc and LibJS Heap.
2021-12-26Kernel: Remove arbitrary alignment requirement from kmalloc_aligned()Andreas Kling
We were not allowing alignments greater than PAGE_SIZE for some reason.
2021-12-26Kernel: Log purported size of bogus kfree_sized() requestsAndreas Kling
2021-12-26Kernel: Remove kfree(), leaving only kfree_sized() :^)Andreas Kling
There are no more users of the C-style kfree() API in the kernel, so let's get rid of it and enjoy the new world where we always know how much memory we are freeing. :^)