Commit Graph

6910 Commits

Author SHA1 Message Date
Andreas Kling
5507945306 Kernel: Widen PhysicalPage refcount to 32 bits
A 16-bit refcount is just begging for trouble right nowl.
A 32-bit refcount will be begging for trouble later down the line,
so we'll have to revisit this eventually. :^)
2020-02-15 22:34:48 +01:00
thatlittlegit
51628f64fa Welcome: Apply @shannonbooth's recommendations 2020-02-15 20:46:10 +01:00
thatlittlegit
c07c442640 Welcome: Change copyrights in my code to 'SerenityOS developers' 2020-02-15 20:46:10 +01:00
thatlittlegit
f4958aea21 Welcome: Reduce the width and margins of the menu
I think it looks better where it takes up less space.
2020-02-15 20:46:10 +01:00
thatlittlegit
d5617fc855 Welcome: 'Welcome to Serenity' -> 'Welcome to SerenityOS' 2020-02-15 20:46:10 +01:00
thatlittlegit
7a3bdf3563 Welcome: Add icons to welcome entries 2020-02-15 20:46:10 +01:00
thatlittlegit
bc28e55d61 Base: Add documentation for the welcome.txt format 2020-02-15 20:46:10 +01:00
thatlittlegit
ba27b56200 Welcome: Add some more pages for Development and Multimedia 2020-02-15 20:46:10 +01:00
thatlittlegit
a55b96a1ea Welcome: Separate text from source code by parsing
This allows modification at runtime, as well as easier editing than C++
structures.
2020-02-15 20:46:10 +01:00
thatlittlegit
7caa8b7531 Welcome: Add pledge and unveil 2020-02-15 20:46:10 +01:00
thatlittlegit
37daae1451 Welcome: Use a proper heading font for 'Welcome to Serenity!' 2020-02-15 20:46:10 +01:00
thatlittlegit
ce2c1e824d Welcome: Push in the buttons depending on which page is selected 2020-02-15 20:46:10 +01:00
thatlittlegit
783f5dc07f Welcome: Replace PNG background with gradient
This allows scaling to larger window sizes, something that the PNG
didn't do well.
2020-02-15 20:46:10 +01:00
thatlittlegit
d647749737 Welcome: Remove crash and ensure text doesn't all stay on one line.
When size_t replaced int (6f4c370), it caused the 'start = -1' trick to
fail, setting start to (unsigned)-1 instead. This then caused
String.substring to fail, as that is a little bit higher than the length
of the string! This resulted in an outright crash.

Later, the builder is not reset before making a new line. This causes
the line to simply be the earlier one, but with more text on it.

(There's also a few changes from clang-format, namely the #include
reorganization.)

Fixes #1211 (although I wasn't aware of it when I made this commit).
2020-02-15 20:46:10 +01:00
Andreas Kling
f27a646bf5 AK: Don't bring in LibBareMetal's kstdio.h in userspace 2020-02-15 19:18:56 +01:00
Tibor Nagy
7ec1b2e44b LibGUI: Unfocused TextEditors should use inactive selection colors 2020-02-15 18:42:13 +01:00
Tibor Nagy
e455af8d33 Base: Add inactive selection colors to the system themes 2020-02-15 18:42:13 +01:00
Tibor Nagy
4d95163400 LibGUI: Use inactive selection colors from palette instead of hardcoding them 2020-02-15 18:42:13 +01:00
Tibor Nagy
99192fd29f LibGfx: Add inactive selection colors 2020-02-15 18:42:13 +01:00
Andreas Kling
b515ea454f AK: Make sure that Weakable always has the same memory layout
Weakable objects ended up with differing memory layouts in some ports
since they don't build with the DEBUG macro defined.

Instead of forcing ports to define DEBUG, just put this behind a custom
WEAKABLE_DEBUG macro and leave it always-on for now.
2020-02-15 14:49:57 +01:00
Andreas Kling
d5e167e725 LibBareMetal: Install headers so ports can pick them up 2020-02-15 13:31:41 +01:00
Andreas Kling
175cd4d9c2 AK: Fix broken #include statement 2020-02-15 13:28:33 +01:00
Andreas Kling
c624d3875e Kernel: Use a shared physical page for zero-filled pages until written
This patch adds a globally shared zero-filled PhysicalPage that will
be mapped into every slot of every zero-filled AnonymousVMObject until
that page is written to, achieving CoW-like zero-filled pages.

Initial testing show that this doesn't actually achieve any sharing yet
but it seems like a good design regardless, since it may reduce the
number of page faults taken by programs.

If you look at the refcount of MM.shared_zero_page() it will have quite
a high refcount, but that's just because everything maps it everywhere.
If you want to see the "real" refcount, you can build with the
MAP_SHARED_ZERO_PAGE_LAZILY flag, and we'll defer mapping of the shared
zero page until the first NP read fault.

I've left this behavior behind a flag for future testing of this code.
2020-02-15 13:17:40 +01:00
Andreas Kling
a4d857e3c5 LibIPC+IPCCompiler: Add IPC::Decoder, let classes decode themselves
This shaves ~5 seconds off of a full build, not too bad. Also it just
seems nicer to push this logic out to classes. It could be better but
it's a start. :^)
2020-02-15 12:11:19 +01:00
Andreas Kling
dc417ada6d AK: Add BufferStream to Forward.h 2020-02-15 12:10:48 +01:00
Andreas Kling
2ae9a56c3f LibIPC: Move IPC::Encoder functions out of line
Compiling anything that includes generated IPC messages is painfully
slow at the moment. This moves the encoding helpers out of line, which
helps a bit. Doing the same for decoding will help more.
2020-02-15 12:10:48 +01:00
Andreas Kling
ef01af1cb2 LibIPC+IPCCompiler: Remove some unused members from generated messages 2020-02-15 12:10:48 +01:00
Shannon Booth
20d9c431ce Shell: Use SkipParentAndBaseDir flag in DirIterator 2020-02-15 11:40:05 +01:00
Shannon Booth
6764b77788 LibCore: Add SkipParentAndBaseDir flag in DirIterator
Sometimes we may want to iterate over dotfiles but not include the
parent or base directory
2020-02-15 11:40:05 +01:00
Shannon Booth
3879d75219 LibCore: Simplify some of DirIterator's code
The main changes are in advance_next() where we flatten some of the
nesting to improve readability
2020-02-15 11:40:05 +01:00
Shannon Booth
9920d17342 AK: Add String starts_with(char) & ends_with(char)
This is simply meant to be a more efficient implementation in the
case that we only need to check a single character.
2020-02-15 11:40:05 +01:00
Andreas Kling
0e3a9d8e9d LibCore: Reduce header dependencies of EventLoop 2020-02-15 02:09:00 +01:00
Andreas Kling
b011ea9962 LibGUI: Reduce menu-related header dependencies 2020-02-15 01:56:30 +01:00
Andreas Kling
9e83bbe1cd LibGUI: Reduce header dependencies of GUI::Action 2020-02-15 01:34:00 +01:00
Andreas Kling
10ccc9e11c LibGUI: Don't leak every tooltip window ever :^) 2020-02-15 01:27:37 +01:00
Andreas Kling
dcb0766d3f LibGUI: Remove some header dependencies from Application.h 2020-02-15 01:18:32 +01:00
Andreas Kling
93e9c2732b LibGfx: Remove unused Bitmap::load_from_file() for loading raw RGBA
This was not used anywhere but added unnecessary members to Bitmap.
2020-02-15 01:06:32 +01:00
Andreas Kling
9c0c677d57 LibGfx: Reduce header dependencies of Bitmap and Font 2020-02-15 01:03:37 +01:00
Andreas Kling
34b5ff7c29 LibGfx: Move a bunch of LogStream::operator<< to cpp files 2020-02-15 00:58:54 +01:00
Andreas Kling
3866e0d4d4 LibCore: Move LogStream::operator<< overloads into cpp files 2020-02-15 00:58:52 +01:00
Andreas Kling
2a41bff329 LibCore: Remove a bunch of unnecessary forward declarations
Now that we get LibCore forward declarations from <LibCore/Forward.h>,
we don't need to declare things manually.
2020-02-15 00:32:33 +01:00
Andreas Kling
66903ad987 LibGfx: Remove Utf8View.h dependency from Font.h 2020-02-15 00:27:50 +01:00
Andreas Kling
e1ff4fa034 LibGUI: Remove more header dependencies from Widget.h 2020-02-15 00:24:14 +01:00
Andreas Kling
69400c2ca1 LibCore: Replace manual forward declarations with <LibCore/Forward.h> 2020-02-15 00:13:44 +01:00
Andreas Kling
6a3cd11a80 AK: Remove manual forward declarations with <AK/Forward.h> 2020-02-15 00:12:31 +01:00
Andreas Kling
a368cf7d51 LibGfx: Replace manual forward declarations with <LibGfx/Forward.h> 2020-02-15 00:10:34 +01:00
Andreas Kling
34c7322d77 LibGUI: Remove some header dependencies from Widget.h 2020-02-14 23:53:11 +01:00
Andreas Kling
08cae2773d LibGfx: More work on header dependency reduction 2020-02-14 23:33:21 +01:00
Andreas Kling
d85b09893d AK: Add Utf8View to Forward.h 2020-02-14 23:31:18 +01:00
Andreas Kling
22b41a0fa3 AK: Add LogStream and DebugLogStream to Forward.h 2020-02-14 23:31:18 +01:00