mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 17:10:23 +00:00
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:
parent
54cb888e2f
commit
40f9c9f82a
Notes:
github-actions[bot]
2024-07-24 15:50:07 +00:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/LadybirdBrowser/ladybird/commit/40f9c9f82a7 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/808
5 changed files with 0 additions and 15 deletions
|
@ -78,8 +78,6 @@ void DisplayList::mark_unnecessary_commands()
|
||||||
|
|
||||||
void DisplayList::execute(DisplayListPlayer& executor)
|
void DisplayList::execute(DisplayListPlayer& executor)
|
||||||
{
|
{
|
||||||
executor.prepare_to_execute(m_corner_clip_max_depth);
|
|
||||||
|
|
||||||
HashTable<u32> skipped_sample_corner_commands;
|
HashTable<u32> skipped_sample_corner_commands;
|
||||||
size_t next_command_index = 0;
|
size_t next_command_index = 0;
|
||||||
while (next_command_index < m_commands.size()) {
|
while (next_command_index < m_commands.size()) {
|
||||||
|
|
|
@ -66,7 +66,6 @@ public:
|
||||||
virtual void sample_under_corners(SampleUnderCorners const&) = 0;
|
virtual void sample_under_corners(SampleUnderCorners const&) = 0;
|
||||||
virtual void blit_corner_clipping(BlitCornerClipping const&) = 0;
|
virtual void blit_corner_clipping(BlitCornerClipping const&) = 0;
|
||||||
virtual bool would_be_fully_clipped_by_painter(Gfx::IntRect) 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 {
|
class DisplayList {
|
||||||
|
@ -77,9 +76,6 @@ public:
|
||||||
void mark_unnecessary_commands();
|
void mark_unnecessary_commands();
|
||||||
void execute(DisplayListPlayer&);
|
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:
|
private:
|
||||||
struct CommandListItem {
|
struct CommandListItem {
|
||||||
Optional<i32> scroll_frame_id;
|
Optional<i32> scroll_frame_id;
|
||||||
|
@ -87,7 +83,6 @@ private:
|
||||||
bool skip { false };
|
bool skip { false };
|
||||||
};
|
};
|
||||||
|
|
||||||
size_t m_corner_clip_max_depth { 0 };
|
|
||||||
AK::SegmentedVector<CommandListItem, 512> m_commands;
|
AK::SegmentedVector<CommandListItem, 512> m_commands;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -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)
|
void DisplayListPlayerSkia::sample_under_corners(SampleUnderCorners const& command)
|
||||||
{
|
{
|
||||||
auto rounded_rect = to_skia_rrect(command.border_rect, command.corner_radii);
|
auto rounded_rect = to_skia_rrect(command.border_rect, command.corner_radii);
|
||||||
|
|
|
@ -65,8 +65,6 @@ public:
|
||||||
|
|
||||||
bool would_be_fully_clipped_by_painter(Gfx::IntRect) const override;
|
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&);
|
DisplayListPlayerSkia(Gfx::Bitmap&);
|
||||||
|
|
||||||
#ifdef USE_VULKAN
|
#ifdef USE_VULKAN
|
||||||
|
|
|
@ -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)
|
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 });
|
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 {
|
append(SampleUnderCorners {
|
||||||
id,
|
id,
|
||||||
corner_radii,
|
corner_radii,
|
||||||
|
|
Loading…
Reference in a new issue