Instead of first doubling the required size for the determined inode
count and then _also_ tripling the sum of that and the determined disk
size, let's be a bit more reasonable and just double the sum of inode
count * size and disk size.
This results in a 1.4GB _disk_image, instead of the 2GB from before
(for < 800MB worth of files).
By providing SERENITY_DISK_SIZE_BYTES as an environment variable, the
calculation of default value considered suitable for the size of files
and number of inodes that will be included can be sidestepped.
This commit adds draw_ellipse() and moves the shared code
for circles and ellipses to draw_ellipse_part().
draw_ellipse_part() can draw an entire circle in one call using
8-way symmetry and an ellipse in two calls using 4-way symmetry.
This method will center a group of window rects, within some
bounds, accounting for the properties of the currently selected theme
(i.e. border width, title height, etc).
This also makes us a bit more accurate, due to better rounding of
intermediate results.
This also gives us the flush-to-zero and denormals-are-zero SSE settings
for free! (Assuming UE is build with SSE)
This is only enabled for clang right now, because it does not seem to
work on GCC.
Also fixes the types of two intermediate results
Co-authored-by: kleines Filmröllchen <filmroellchen@serenityos.org>
This allows direct inlining and hides away some assembly and
bit-fiddling when manipulating the floating point environment.
This only implements the x87/SSE versions, as of now.
We were always calling llround[fd], even for floating point targets.
Also for rounding to integer, we don't need to have C99's rounding rules
and can just cast, assuming the standard rounding mode.
This uses the `fistp` and `cvts[sd]2si` respectively, to potentially
round floating point values with just one instruction.
This falls back to `llrint[fl]?` on aarch64 for now.
This way, we can change the constant in one place. Note that this
requires the use of nested format strings, which is slightly ugly but
safe to do in this instance.
This constant is currently 3 but can be changed easily or integrated
into a user setting. Note that the results are not ideal because during
pretty-printing we're not using any nice rounding rules, so many
percentage values will actually appear as 0.399999 even though they were
rounded to three digits.
This has been overkill from the start, and it has been bugging me for a
long time. With this change, we're probably a bit slower on most
platforms but save huge amounts of space with all in-memory sample
datastructures.
- HighlightWindow text and strip colors now dark blue.
- MovingWindowShadow color made lighter, so that it's more visible.
- RubberBand now has silver colors.
Also removes mrsh from the list of ports missing descriptions. I tried
to be descriptive about the patches, but as I picked this port up from
someone else, I'm not 100% sure how to best explain the patches.
Using a Vector<Value> is unsafe as GC cannot see the stored values.
This is then vended to outside users of ConsoleClient, e.g. LibWeb and
WebContent, which is then outside of LibJS's control.
An example issue is if the client stores it for later use and forgets
to visit the stored values, meaning they can be destroyed at any time.
We can save the client from this by vending a MarkedVector<Value> to
them.