1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 18:37:34 +00:00

LibGUI: Improve IconView rubberband performance

Rather than invalidating the entire window, which is very expensive on
the transparent desktop widget, just invalidate the areas that actually
need updating.
This commit is contained in:
Tom 2021-02-15 19:30:47 -07:00 committed by Andreas Kling
parent cd0a1fa5b0
commit 6cdb657493
5 changed files with 30 additions and 6 deletions

View file

@ -129,6 +129,8 @@ public:
m_state_stack.take_last();
}
IntRect clip_rect() const { return state().clip_rect; }
protected:
IntPoint translation() const { return state().translation; }
IntRect to_physical(const IntRect& r) const { return r.translated(translation()) * scale(); }
@ -139,7 +141,6 @@ protected:
void fill_rect_with_draw_op(const IntRect&, Color);
void blit_with_opacity(const IntPoint&, const Gfx::Bitmap&, const IntRect& src_rect, float opacity, bool apply_alpha = true);
void draw_physical_pixel(const IntPoint&, Color, int thickness = 1);
IntRect clip_rect() const { return state().clip_rect; }
struct State {
const Font* font;