Changeset 8bb0f5d6 in mainline
- Timestamp:
- 2014-01-16T16:43:04Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- dace86a
- Parents:
- 296e124e
- Location:
- uspace/srv/hid/compositor
- Files:
-
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/compositor/Makefile
r296e124e r8bb0f5d6 34 34 35 35 SOURCES = \ 36 compositor.c \ 37 images.c 38 39 IMAGES = \ 40 gfx/nameic.tga 41 42 PRE_DEPEND = images.c images.h 43 EXTRA_CLEAN = images.c images.h 36 compositor.c 44 37 45 38 include $(USPACE_PREFIX)/Makefile.common 46 47 images.c images.h: $(IMAGES)48 $(ROOT_PATH)/tools/mkarray.py images COMPOSITOR_IMAGES $^ -
uspace/srv/hid/compositor/compositor.c
r296e124e r8bb0f5d6 72 72 #include <codec/tga.h> 73 73 74 #include "images.h"75 74 #include "compositor.h" 76 75 … … 1746 1745 key == KC_O || key == KC_P); 1747 1746 bool kconsole_switch = (mods & KM_ALT) && (key == KC_M); 1748 bool compositor_test = (mods & KM_ALT) && (key == KC_H);1749 1747 1750 1748 bool filter = (type == KEY_RELEASE) && (win_transform || win_resize || 1751 1749 win_opacity || win_close || win_switch || viewport_move || 1752 viewport_change || kconsole_switch || compositor_test);1750 viewport_change || kconsole_switch); 1753 1751 1754 1752 if (filter) { … … 2014 2012 } else if (kconsole_switch) { 2015 2013 __SYSCALL0(SYS_DEBUG_ACTIVATE_CONSOLE); 2016 } else if (compositor_test) {2017 fibril_mutex_lock(&window_list_mtx);2018 2019 window_t *red_win = window_create(0, 0);2020 red_win->surface = surface_create(250, 150, NULL, 0);2021 pixel_t red_pix = PIXEL(255, 240, 0, 0);2022 for (sysarg_t y = 0; y < 150; ++y) {2023 for (sysarg_t x = 0; x < 250; ++x) {2024 surface_put_pixel(red_win->surface, x, y, red_pix);2025 }2026 }2027 list_prepend(&red_win->link, &window_list);2028 2029 window_t *blue_win = window_create(0, 0);2030 blue_win->surface = surface_create(200, 100, NULL, 0);2031 pixel_t blue_pix = PIXEL(255, 0, 0, 240);2032 for (sysarg_t y = 0; y < 100; ++y) {2033 for (sysarg_t x = 0; x < 200; ++x) {2034 surface_put_pixel(blue_win->surface, x, y, blue_pix);2035 }2036 }2037 list_prepend(&blue_win->link, &window_list);2038 2039 window_t *nameic_win = window_create(0, 0);2040 nameic_win->surface = decode_tga((void *) nameic_tga, nameic_tga_size, 0);2041 list_prepend(&nameic_win->link, &window_list);2042 2043 fibril_mutex_unlock(&window_list_mtx);2044 comp_damage(0, 0, UINT32_MAX, UINT32_MAX);2045 2014 } else { 2046 2015 window_event_t *event = (window_event_t *) malloc(sizeof(window_event_t));
Note:
See TracChangeset
for help on using the changeset viewer.