LibWeb: Remove optional prepare step from DisplayListPlayer

This was only needed by removed LibGfx painter to ensure capacity of a
vector with border corner clippers.
This commit is contained in:
Aliaksandr Kalenik 2024-07-24 16:29:35 +03:00 committed by Alexander Kalenik
parent 54cb888e2f
commit 40f9c9f82a
Notes: github-actions[bot] 2024-07-24 15:50:07 +00:00
5 changed files with 0 additions and 15 deletions

View file

@ -78,8 +78,6 @@ void DisplayList::mark_unnecessary_commands()
void DisplayList::execute(DisplayListPlayer& executor)
{
executor.prepare_to_execute(m_corner_clip_max_depth);
HashTable<u32> skipped_sample_corner_commands;
size_t next_command_index = 0;
while (next_command_index < m_commands.size()) {

View file

@ -66,7 +66,6 @@ public:
virtual void sample_under_corners(SampleUnderCorners const&) = 0;
virtual void blit_corner_clipping(BlitCornerClipping const&) = 0;
virtual bool would_be_fully_clipped_by_painter(Gfx::IntRect) const = 0;
virtual void prepare_to_execute([[maybe_unused]] size_t corner_clip_max_depth) { }
};
class DisplayList {
@ -77,9 +76,6 @@ public:
void mark_unnecessary_commands();
void execute(DisplayListPlayer&);
size_t corner_clip_max_depth() const { return m_corner_clip_max_depth; }
void set_corner_clip_max_depth(size_t depth) { m_corner_clip_max_depth = depth; }
private:
struct CommandListItem {
Optional<i32> scroll_frame_id;
@ -87,7 +83,6 @@ private:
bool skip { false };
};
size_t m_corner_clip_max_depth { 0 };
AK::SegmentedVector<CommandListItem, 512> m_commands;
};

View file

@ -1292,10 +1292,6 @@ void DisplayListPlayerSkia::draw_triangle_wave(DrawTriangleWave const&)
{
}
void DisplayListPlayerSkia::prepare_to_execute(size_t)
{
}
void DisplayListPlayerSkia::sample_under_corners(SampleUnderCorners const& command)
{
auto rounded_rect = to_skia_rrect(command.border_rect, command.corner_radii);

View file

@ -65,8 +65,6 @@ public:
bool would_be_fully_clipped_by_painter(Gfx::IntRect) const override;
virtual void prepare_to_execute(size_t corner_clip_max_depth) override;
DisplayListPlayerSkia(Gfx::Bitmap&);
#ifdef USE_VULKAN

View file

@ -28,8 +28,6 @@ void DisplayListRecorder::append(Command&& command)
void DisplayListRecorder::sample_under_corners(u32 id, CornerRadii corner_radii, Gfx::IntRect border_rect, CornerClip corner_clip)
{
m_corner_clip_state_stack.append({ id, border_rect });
if (m_corner_clip_state_stack.size() > display_list().corner_clip_max_depth())
display_list().set_corner_clip_max_depth(m_corner_clip_state_stack.size());
append(SampleUnderCorners {
id,
corner_radii,