mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 08:08:43 +00:00
LibWeb: Rename Command to DisplayListCommand
Gives name more consistent with other display list related classes.
This commit is contained in:
parent
61114f6d16
commit
b265618bfb
Notes:
github-actions[bot]
2025-08-01 09:27:42 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: b265618bfb
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5669
Reviewed-by: https://github.com/gmta
7 changed files with 14 additions and 14 deletions
|
@ -725,8 +725,8 @@ set(SOURCES
|
||||||
Painting/CanvasPaintable.cpp
|
Painting/CanvasPaintable.cpp
|
||||||
Painting/CheckBoxPaintable.cpp
|
Painting/CheckBoxPaintable.cpp
|
||||||
Painting/ClipFrame.cpp
|
Painting/ClipFrame.cpp
|
||||||
Painting/Command.cpp
|
|
||||||
Painting/DisplayList.cpp
|
Painting/DisplayList.cpp
|
||||||
|
Painting/DisplayListCommand.cpp
|
||||||
Painting/DisplayListPlayerSkia.cpp
|
Painting/DisplayListPlayerSkia.cpp
|
||||||
Painting/DisplayListRecorder.cpp
|
Painting/DisplayListRecorder.cpp
|
||||||
Painting/DisplayListRecordingContext.cpp
|
Painting/DisplayListRecordingContext.cpp
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
namespace Web::Painting {
|
namespace Web::Painting {
|
||||||
|
|
||||||
void DisplayList::append(Command&& command, Optional<i32> scroll_frame_id, RefPtr<ClipFrame const> clip_frame)
|
void DisplayList::append(DisplayListCommand&& command, Optional<i32> scroll_frame_id, RefPtr<ClipFrame const> clip_frame)
|
||||||
{
|
{
|
||||||
m_commands.append({ scroll_frame_id, clip_frame, move(command) });
|
m_commands.append({ scroll_frame_id, clip_frame, move(command) });
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ String DisplayList::dump() const
|
||||||
return builder.to_string_without_validation();
|
return builder.to_string_without_validation();
|
||||||
}
|
}
|
||||||
|
|
||||||
static Optional<Gfx::IntRect> command_bounding_rectangle(Command const& command)
|
static Optional<Gfx::IntRect> command_bounding_rectangle(DisplayListCommand const& command)
|
||||||
{
|
{
|
||||||
return command.visit(
|
return command.visit(
|
||||||
[&](auto const& command) -> Optional<Gfx::IntRect> {
|
[&](auto const& command) -> Optional<Gfx::IntRect> {
|
||||||
|
@ -36,7 +36,7 @@ static Optional<Gfx::IntRect> command_bounding_rectangle(Command const& command)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool command_is_clip_or_mask(Command const& command)
|
static bool command_is_clip_or_mask(DisplayListCommand const& command)
|
||||||
{
|
{
|
||||||
return command.visit(
|
return command.visit(
|
||||||
[&](auto const& command) -> bool {
|
[&](auto const& command) -> bool {
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#include <LibWeb/CSS/Enums.h>
|
#include <LibWeb/CSS/Enums.h>
|
||||||
#include <LibWeb/Forward.h>
|
#include <LibWeb/Forward.h>
|
||||||
#include <LibWeb/Painting/ClipFrame.h>
|
#include <LibWeb/Painting/ClipFrame.h>
|
||||||
#include <LibWeb/Painting/Command.h>
|
#include <LibWeb/Painting/DisplayListCommand.h>
|
||||||
#include <LibWeb/Painting/ScrollState.h>
|
#include <LibWeb/Painting/ScrollState.h>
|
||||||
|
|
||||||
namespace Web::Painting {
|
namespace Web::Painting {
|
||||||
|
@ -89,15 +89,15 @@ public:
|
||||||
return adopt_ref(*new DisplayList(device_pixels_per_css_pixel));
|
return adopt_ref(*new DisplayList(device_pixels_per_css_pixel));
|
||||||
}
|
}
|
||||||
|
|
||||||
void append(Command&& command, Optional<i32> scroll_frame_id, RefPtr<ClipFrame const>);
|
void append(DisplayListCommand&& command, Optional<i32> scroll_frame_id, RefPtr<ClipFrame const>);
|
||||||
|
|
||||||
struct CommandListItem {
|
struct DisplayListCommandWithScrollAndClip {
|
||||||
Optional<i32> scroll_frame_id;
|
Optional<i32> scroll_frame_id;
|
||||||
RefPtr<ClipFrame const> clip_frame;
|
RefPtr<ClipFrame const> clip_frame;
|
||||||
Command command;
|
DisplayListCommand command;
|
||||||
};
|
};
|
||||||
|
|
||||||
AK::SegmentedVector<CommandListItem, 512> const& commands() const { return m_commands; }
|
AK::SegmentedVector<DisplayListCommandWithScrollAndClip, 512> const& commands() const { return m_commands; }
|
||||||
double device_pixels_per_css_pixel() const { return m_device_pixels_per_css_pixel; }
|
double device_pixels_per_css_pixel() const { return m_device_pixels_per_css_pixel; }
|
||||||
|
|
||||||
String dump() const;
|
String dump() const;
|
||||||
|
@ -108,7 +108,7 @@ private:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
AK::SegmentedVector<CommandListItem, 512> m_commands;
|
AK::SegmentedVector<DisplayListCommandWithScrollAndClip, 512> m_commands;
|
||||||
double m_device_pixels_per_css_pixel;
|
double m_device_pixels_per_css_pixel;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* SPDX-License-Identifier: BSD-2-Clause
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <LibWeb/Painting/Command.h>
|
#include <LibWeb/Painting/DisplayListCommand.h>
|
||||||
#include <LibWeb/Painting/ShadowPainting.h>
|
#include <LibWeb/Painting/ShadowPainting.h>
|
||||||
|
|
||||||
namespace Web::Painting {
|
namespace Web::Painting {
|
|
@ -482,7 +482,7 @@ struct ApplyMaskBitmap {
|
||||||
void dump(StringBuilder&) const;
|
void dump(StringBuilder&) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
using Command = Variant<
|
using DisplayListCommand = Variant<
|
||||||
DrawGlyphRun,
|
DrawGlyphRun,
|
||||||
FillRect,
|
FillRect,
|
||||||
DrawPaintingSurface,
|
DrawPaintingSurface,
|
|
@ -7,8 +7,8 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <LibGfx/SkiaBackendContext.h>
|
#include <LibGfx/SkiaBackendContext.h>
|
||||||
#include <LibWeb/Painting/Command.h>
|
|
||||||
#include <LibWeb/Painting/DisplayList.h>
|
#include <LibWeb/Painting/DisplayList.h>
|
||||||
|
#include <LibWeb/Painting/DisplayListCommand.h>
|
||||||
#include <LibWeb/Painting/DisplayListRecorder.h>
|
#include <LibWeb/Painting/DisplayListRecorder.h>
|
||||||
|
|
||||||
class GrDirectContext;
|
class GrDirectContext;
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
* SPDX-License-Identifier: BSD-2-Clause
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <LibWeb/Painting/Command.h>
|
|
||||||
#include <LibWeb/Painting/DisplayList.h>
|
#include <LibWeb/Painting/DisplayList.h>
|
||||||
|
#include <LibWeb/Painting/DisplayListCommand.h>
|
||||||
#include <LibWeb/Painting/DisplayListRecorder.h>
|
#include <LibWeb/Painting/DisplayListRecorder.h>
|
||||||
#include <LibWeb/Painting/ShadowPainting.h>
|
#include <LibWeb/Painting/ShadowPainting.h>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue