mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 21:57:35 +00:00
LibWeb: Move BorderRadiusCornerClipper allocation into CPU executor
BorderRadiusCornerClipper usage to clip border radius is specific to CPU painter so it should not be stored in painting commands. Also with this change bitmaps for corner sampling are allocated during painting commands replaying instead of commands recording.
This commit is contained in:
parent
89fd8dfaad
commit
e8960cf754
12 changed files with 85 additions and 63 deletions
|
@ -299,13 +299,17 @@ struct DrawTriangleWave {
|
|||
};
|
||||
|
||||
struct SampleUnderCorners {
|
||||
NonnullRefPtr<BorderRadiusCornerClipper> corner_clipper;
|
||||
u32 id;
|
||||
CornerRadii corner_radii;
|
||||
Gfx::IntRect border_rect;
|
||||
CornerClip corner_clip;
|
||||
|
||||
[[nodiscard]] Gfx::IntRect bounding_rect() const;
|
||||
};
|
||||
|
||||
struct BlitCornerClipping {
|
||||
NonnullRefPtr<BorderRadiusCornerClipper> corner_clipper;
|
||||
u32 id;
|
||||
Gfx::IntRect border_rect;
|
||||
|
||||
[[nodiscard]] Gfx::IntRect bounding_rect() const;
|
||||
};
|
||||
|
@ -387,8 +391,8 @@ public:
|
|||
virtual CommandResult apply_backdrop_filter(Gfx::IntRect const& backdrop_region, Web::CSS::ResolvedBackdropFilter const& backdrop_filter) = 0;
|
||||
virtual CommandResult draw_rect(Gfx::IntRect const& rect, Color const&, bool rough) = 0;
|
||||
virtual CommandResult draw_triangle_wave(Gfx::IntPoint const& p1, Gfx::IntPoint const& p2, Color const& color, int amplitude, int thickness) = 0;
|
||||
virtual CommandResult sample_under_corners(BorderRadiusCornerClipper&) = 0;
|
||||
virtual CommandResult blit_corner_clipping(BorderRadiusCornerClipper&) = 0;
|
||||
virtual CommandResult sample_under_corners(u32 id, CornerRadii const&, Gfx::IntRect const&, CornerClip) = 0;
|
||||
virtual CommandResult blit_corner_clipping(u32 id) = 0;
|
||||
virtual CommandResult paint_borders(DevicePixelRect const& border_rect, CornerRadii const& corner_radii, BordersDataDevicePixels const& borders_data) = 0;
|
||||
|
||||
virtual bool would_be_fully_clipped_by_painter(Gfx::IntRect) const = 0;
|
||||
|
@ -482,8 +486,8 @@ public:
|
|||
void push_stacking_context(PushStackingContextParams params);
|
||||
void pop_stacking_context();
|
||||
|
||||
void sample_under_corners(NonnullRefPtr<BorderRadiusCornerClipper> corner_clipper);
|
||||
void blit_corner_clipping(NonnullRefPtr<BorderRadiusCornerClipper> corner_clipper);
|
||||
void sample_under_corners(u32 id, CornerRadii corner_radii, Gfx::IntRect border_rect, CornerClip corner_clip);
|
||||
void blit_corner_clipping(u32 id, Gfx::IntRect border_rect);
|
||||
|
||||
void paint_progressbar(Gfx::IntRect frame_rect, Gfx::IntRect progress_rect, Palette palette, int min, int max, int value, StringView text);
|
||||
void paint_frame(Gfx::IntRect rect, Palette palette, Gfx::FrameStyle style);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue