Changeset 7dba813 in mainline for uspace/lib/draw/surface.c


Ignore:
Timestamp:
2012-11-22T09:03:39Z (12 years ago)
Author:
Petr Koupy <petr.koupy@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ba733e83
Parents:
8e6ec6e
Message:

Resolved Ticket #485 (Desktop is slow). GUI is usable in Qemu/non-KVM as long as windows are not transparent, rotated or scaled (i.e. if user limits himself only to translation and resizing).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/draw/surface.c

    r8e6ec6e r7dba813  
    143143}
    144144
     145void surface_add_damaged_region(surface_t *surface, surface_coord_t x, surface_coord_t y,
     146    surface_coord_t width, surface_coord_t height)
     147{
     148        surface->dirty_x_lo = surface->dirty_x_lo > x ? x : surface->dirty_x_lo;
     149        surface->dirty_y_lo = surface->dirty_y_lo > y ? y : surface->dirty_y_lo;
     150
     151        surface_coord_t x_hi = x + width - 1;
     152        surface_coord_t y_hi = y + height - 1;
     153
     154        surface->dirty_x_hi = surface->dirty_x_hi < x_hi ? x_hi : surface->dirty_x_hi;
     155        surface->dirty_y_hi = surface->dirty_y_hi < y_hi ? y_hi : surface->dirty_y_hi;
     156}
     157
    145158void surface_reset_damaged_region(surface_t *surface)
    146159{
Note: See TracChangeset for help on using the changeset viewer.