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:
parent
cd0a1fa5b0
commit
6cdb657493
5 changed files with 30 additions and 6 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue