Everywhere: Pass backing store into Navigable::paint()

...instead of Gfx::Bitmap, which makes it possible to access and
directly paint into IOSurface on macOS.
This commit is contained in:
Aliaksandr Kalenik 2024-06-25 16:43:39 +02:00 committed by Alexander Kalenik
commit c62cc915df
Notes: sideshowbarker 2024-07-17 02:56:25 +09:00
18 changed files with 145 additions and 30 deletions

View file

@ -1174,8 +1174,10 @@ JS::GCPtr<DOM::Node> TraversableNavigable::currently_focused_area()
return candidate;
}
void TraversableNavigable::paint(Web::DevicePixelRect const& content_rect, Gfx::Bitmap& target, Web::PaintOptions paint_options)
void TraversableNavigable::paint(Web::DevicePixelRect const& content_rect, Painting::BackingStore& backing_store, Web::PaintOptions paint_options)
{
auto& target = backing_store.bitmap();
Painting::DisplayList display_list;
Painting::DisplayListRecorder display_list_recorder(display_list);

View file

@ -12,6 +12,7 @@
#include <LibWeb/HTML/SessionHistoryTraversalQueue.h>
#include <LibWeb/HTML/VisibilityState.h>
#include <LibWeb/Page/Page.h>
#include <WebContent/BackingStoreManager.h>
namespace Web::HTML {
@ -85,7 +86,7 @@ public:
[[nodiscard]] JS::GCPtr<DOM::Node> currently_focused_area();
void paint(Web::DevicePixelRect const&, Gfx::Bitmap&, Web::PaintOptions);
void paint(Web::DevicePixelRect const&, Painting::BackingStore&, Web::PaintOptions);
private:
TraversableNavigable(JS::NonnullGCPtr<Page>);