• Florian Will's avatar
    win32u: Only retrieve the dc size if needed. · 6dfad4c2
    Florian Will authored
    SetMapMode(.., MM_TEXT) is called a lot in common gdiplus use cases via
    gdi_transform_acquire(). Querying the size and resolution can be
    expensive, so skip it when its not needed.
    
    When running the "ZusiDisplay" ET423 diagnostic display, which uses
    gdiplus heavily, this change increases the "indicator blinking speed"
    from 0.6 per second to 1 per second and probably hits the FPS limit now.
    Also, CPU usage of the ZusiDisplay.exe process goes down from ~75% to
    ~42% of one core according to "top", and wineserver CPU usage goes down
    from ~48% to ~3%.
    Signed-off-by: 's avatarFlorian Will <florian.will@gmail.com>
    Signed-off-by: 's avatarHuw Davies <huw@codeweavers.com>
    Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
    6dfad4c2
mapping.c 14.8 KB