mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 11:27:34 +00:00
WindowServer: Load multiple scaled versions of Bitmaps and Cursors
This enables rendering of mixed-scale screen layouts with e.g. high resolution cursors and window button icons on high-dpi screens while using lower resolution bitmaps on regular screens.
This commit is contained in:
parent
aa15bf81e4
commit
61af9d882e
15 changed files with 269 additions and 99 deletions
|
@ -919,7 +919,7 @@ void Compositor::ScreenData::draw_cursor(Screen& screen, const Gfx::IntRect& cur
|
|||
auto& current_cursor = compositor.m_current_cursor ? *compositor.m_current_cursor : wm.active_cursor();
|
||||
auto screen_rect = screen.rect();
|
||||
m_cursor_back_painter->blit({ 0, 0 }, *m_back_bitmap, current_cursor.rect().translated(cursor_rect.location()).intersected(screen_rect).translated(-screen_rect.location()));
|
||||
m_back_painter->blit(cursor_rect.location(), current_cursor.bitmap(), current_cursor.source_rect(compositor.m_current_cursor_frame));
|
||||
m_back_painter->blit(cursor_rect.location(), current_cursor.bitmap(screen.scale_factor()), current_cursor.source_rect(compositor.m_current_cursor_frame));
|
||||
m_last_cursor_rect = cursor_rect;
|
||||
VERIFY(compositor.m_current_cursor_screen == &screen);
|
||||
m_cursor_back_is_valid = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue