mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-10 18:19:03 +00:00
LibWeb: Rearrange code such that a lot less files include Command.h
Some checks failed
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
Build Dev Container Image / build (push) Has been cancelled
Some checks failed
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
Build Dev Container Image / build (push) Has been cancelled
With this change number of recompiled files after modification of `Command.h` goes down from >1000 to <100.
This commit is contained in:
parent
d980321a77
commit
410e82c9fd
Notes:
github-actions[bot]
2025-07-11 15:38:35 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 410e82c9fd
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5405
17 changed files with 95 additions and 73 deletions
|
@ -45,6 +45,7 @@
|
|||
#include <LibWeb/Layout/Viewport.h>
|
||||
#include <LibWeb/Loader/GeneratedPagesLoader.h>
|
||||
#include <LibWeb/Page/Page.h>
|
||||
#include <LibWeb/Painting/DisplayListPlayerSkia.h>
|
||||
#include <LibWeb/Painting/Paintable.h>
|
||||
#include <LibWeb/Painting/ViewportPaintable.h>
|
||||
#include <LibWeb/Platform/EventLoopPlugin.h>
|
||||
|
@ -2620,4 +2621,9 @@ void Navigable::start_display_list_rendering(Gfx::PaintingSurface& painting_surf
|
|||
m_rendering_thread.enqueue_rendering_task(*display_list, move(scroll_state_snapshot), painting_surface, move(callback));
|
||||
}
|
||||
|
||||
RefPtr<Gfx::SkiaBackendContext> Navigable::skia_backend_context() const
|
||||
{
|
||||
return m_skia_backend_context;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -213,7 +213,7 @@ public:
|
|||
bool needs_repaint() const { return m_needs_repaint; }
|
||||
void set_needs_repaint() { m_needs_repaint = true; }
|
||||
|
||||
RefPtr<Gfx::SkiaBackendContext> skia_backend_context() const { return m_skia_backend_context; }
|
||||
RefPtr<Gfx::SkiaBackendContext> skia_backend_context() const;
|
||||
|
||||
void set_pending_set_browser_zoom_request(bool value) { m_pending_set_browser_zoom_request = value; }
|
||||
bool pending_set_browser_zoom_request() const { return m_pending_set_browser_zoom_request; }
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include <LibCore/EventLoop.h>
|
||||
#include <LibWeb/HTML/RenderingThread.h>
|
||||
#include <LibWeb/HTML/TraversableNavigable.h>
|
||||
#include <LibWeb/Painting/DisplayListPlayerSkia.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
|
@ -43,6 +44,11 @@ void RenderingThread::start(DisplayListPlayerType display_list_player_type)
|
|||
m_thread->start();
|
||||
}
|
||||
|
||||
void RenderingThread::set_skia_player(OwnPtr<Painting::DisplayListPlayerSkia>&& player)
|
||||
{
|
||||
m_skia_player = move(player);
|
||||
}
|
||||
|
||||
void RenderingThread::rendering_thread_loop()
|
||||
{
|
||||
while (true) {
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include <LibThreading/Thread.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
#include <LibWeb/Page/Page.h>
|
||||
#include <LibWeb/Painting/DisplayListPlayerSkia.h>
|
||||
#include <LibWeb/Painting/ScrollState.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
|
@ -27,7 +27,7 @@ public:
|
|||
~RenderingThread();
|
||||
|
||||
void start(DisplayListPlayerType);
|
||||
void set_skia_player(OwnPtr<Painting::DisplayListPlayerSkia>&& player) { m_skia_player = move(player); }
|
||||
void set_skia_player(OwnPtr<Painting::DisplayListPlayerSkia>&& player);
|
||||
void enqueue_rendering_task(NonnullRefPtr<Painting::DisplayList>, Painting::ScrollStateSnapshot&&, NonnullRefPtr<Gfx::PaintingSurface>, Function<void()>&& callback);
|
||||
|
||||
private:
|
||||
|
|
|
@ -12,11 +12,9 @@
|
|||
#include <LibWeb/Geolocation/Geolocation.h>
|
||||
#include <LibWeb/HTML/Navigable.h>
|
||||
#include <LibWeb/HTML/NavigationType.h>
|
||||
#include <LibWeb/HTML/RenderingThread.h>
|
||||
#include <LibWeb/HTML/SessionHistoryTraversalQueue.h>
|
||||
#include <LibWeb/HTML/VisibilityState.h>
|
||||
#include <LibWeb/Page/Page.h>
|
||||
#include <LibWeb/Painting/DisplayListPlayerSkia.h>
|
||||
#include <LibWeb/StorageAPI/StorageShed.h>
|
||||
|
||||
#ifdef AK_OS_MACOS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue