mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 21:07:34 +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
|
@ -18,7 +18,7 @@ enum class CornerClip {
|
|||
|
||||
class BorderRadiusCornerClipper : public RefCounted<BorderRadiusCornerClipper> {
|
||||
public:
|
||||
static ErrorOr<NonnullRefPtr<BorderRadiusCornerClipper>> create(CornerRadii const&, DevicePixelRect const& border_rect, BorderRadiiData const& border_radii, CornerClip corner_clip = CornerClip::Outside);
|
||||
static ErrorOr<NonnullRefPtr<BorderRadiusCornerClipper>> create(CornerRadii const&, DevicePixelRect const& border_rect, CornerClip corner_clip = CornerClip::Outside);
|
||||
|
||||
void sample_under_corners(Gfx::Painter& page_painter);
|
||||
void blit_corner_clipping(Gfx::Painter& page_painter);
|
||||
|
@ -63,6 +63,9 @@ struct ScopedCornerRadiusClip {
|
|||
private:
|
||||
PaintContext& m_context;
|
||||
RefPtr<BorderRadiusCornerClipper> m_corner_clipper;
|
||||
u32 m_id;
|
||||
bool m_has_radius { false };
|
||||
Gfx::IntRect m_border_rect;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue