mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 12:49:19 +00:00
LibWeb: Add optimized painting command for repeated background
With this change, instead of recording a display list item for each instance of a repeated background, a new DrawRepeatedImmutableBitmap type is used. This allows the painter to use optimized repeated image painting and, when the GPU backend is used, avoid re-uploading the image texture for each repetition. Some screenshot tests are affected, but there are no visible regressions. https://null.com/games/chainstaff works a lof faster with this change.
This commit is contained in:
parent
a4b289ebac
commit
c5afe70f77
Notes:
github-actions[bot]
2024-07-24 09:13:52 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: c5afe70f77
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/786
13 changed files with 74 additions and 0 deletions
|
@ -48,6 +48,7 @@ public:
|
|||
void paint(PaintContext& context, DevicePixelRect const& dest_rect, CSS::ImageRendering image_rendering, Vector<Gfx::Path> const& clip_paths = {}) const override;
|
||||
|
||||
virtual Optional<Gfx::Color> color_if_single_pixel_bitmap() const override;
|
||||
Gfx::ImmutableBitmap const* current_frame_bitmap(DevicePixelRect const& dest_rect) const;
|
||||
|
||||
Function<void()> on_animate;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue