Changeset e1c6d5df in mainline for uspace/lib/draw/source.c


Ignore:
Timestamp:
2012-11-29T07:44:58Z (12 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3194d83
Parents:
ff98ce8 (diff), 82edef2 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge from lp:~petr-koupy/helenos/gui-optim.

The main improvements are:

  • significantly faster rendering (making qemu/non-KVM usable) if user limits himself just to window movement and resizing (i.e. avoiding rotation, scaling and transparency)
  • preview of the result of window transformation is depicted by a "ghost" frame following the mouse pointer
  • changing of window focus feels more natural and intuitive (mouse click handler behaves more like in mainstream operating systems, window titles changes color to reflect whether they have focus or not)
File:
1 edited

Legend:

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

    rff98ce8 re1c6d5df  
    9090}
    9191
     92bool source_is_fast(source_t *source)
     93{
     94        return (source->mask == NULL)
     95            && (source->alpha == (pixel_t) PIXEL(255, 0, 0, 0))
     96            && (source->texture != NULL)
     97            && (source->texture_tile == false)
     98            && transform_is_fast(&source->transform);
     99}
     100
     101pixel_t *source_direct_access(source_t *source, double x, double y)
     102{
     103        assert(source_is_fast(source));
     104
     105        long _x = (long) (x + source->transform.m[0][2]);
     106        long _y = (long) (y + source->transform.m[1][2]);
     107
     108        return pixelmap_pixel_at(
     109            surface_pixmap_access(source->texture), (sysarg_t) _x, (sysarg_t) _y);
     110}
     111
    92112pixel_t source_determine_pixel(source_t *source, double x, double y)
    93113{
Note: See TracChangeset for help on using the changeset viewer.