|
Voxia OS v0.0.1
Hobby Project Operating System Targeting x86-64
|
#include "graphic.h"#include "framebuffer.h"#include "hal/cpu/paging.h"#include "init/init.h"#include "libk/debug/debug.h"#include "memory/entry.h"#include "memory/memory_utils.h"#include "memory/vm_manager.h"#include "str.h"#include "type.h"#include "vfs/enum.h"#include <libk/serial.h>#include <memory/kalloc.h>#include <libk/ssfn.h>Go to the source code of this file.
Macros | |
| #define | _STRING_H_ |
| #define | SSFN_memcmp memcmp |
| #define | SSFN_memset ssfn_memset |
| #define | SSFN_memcpy ssfn_memcpy |
| #define | SSFN_realloc ssfn_realloc |
| #define | SSFN_free ssfn_free_ |
| #define | SSFN_IMPLEMENTATION |
Functions | |
| static void * | ssfn_memset (void *__s, int __c, size_t __n) |
| static void * | ssfn_memcpy (void *__restrict__ __dest, const void *__restrict__ __src, size_t __n) |
| static void * | ssfn_realloc (void *ptr, size_t new_size) |
| static void | ssfn_free_ (void *ptr) |
| INIT (graphic) | |
| void | putc (char c, int col, int row, uint32_t fg, uint32_t bg) |
| void | putc_utf8 (const char *s, int col, int row, uint32_t fg, uint32_t bg) |
| int | utf8_char_len (uint8_t c) |
| void | put_pixel (int x, int y, uint32_t color) |
| static __inline__ uint8_t | blend (uint8_t src, uint8_t d, uint8_t a) |
| void | put_pixel_alpha (int x, int y, pixel_t src) |
| void | put_pixel_alpha_fast (int x, int y, pixel_t src) |
| void | clear_screen (uint32_t color) |
| __attribute__ ((unused)) | |
| uint32_t | vxGetWidth (void) |
| uint32_t | vxGetHeight (void) |
| void | vxScroll (int px) |
| uint32_t | screen_cols (void) |
| uint32_t | screen_rows (void) |
| void | fill_rect (int x, int y, int w, int h, uint32_t color) |
Variables | |
| volatile framebuffer_t * | g__fb |
| static ssfn_buf_t | dst |
| static ssfn_t | ssfn_ctx = {0} |
| static boolean_t | ssfn_ready = 0 |
| #define SSFN_free ssfn_free_ |
| #define SSFN_memcpy ssfn_memcpy |
| #define SSFN_memset ssfn_memset |
| #define SSFN_realloc ssfn_realloc |
| __attribute__ | ( | (unused) | ) |
Definition at line 201 of file graphic.c.
Referenced by put_pixel_alpha().
| void clear_screen | ( | uint32_t | color | ) |
Definition at line 290 of file graphic.c.
References g__fb, and memset().
Referenced by start_tty().
| void fill_rect | ( | int | x, |
| int | y, | ||
| int | w, | ||
| int | h, | ||
| uint32_t | color ) |
| INIT | ( | graphic | ) |
Definition at line 87 of file graphic.c.
References kstring::c_str, DEBUG_LEVEL_INFO, dst, ENTRY_MMAP_FRAMEBUFFER, FONT_SIZE, g__fb, get_kernel_vmm_page(), kalloc(), KDEBUG, LOG2_DEBUG, LOG2_WARN, dentry::name, NULL, vnode::ops, PAGE_SIZE, paging_get_highest_page_map(), resolve_dentry(), serial2_printf(), vnode::size, ssfn_ctx, SSFN_FAMILY_ANY, ssfn_load(), SSFN_OK, ssfn_ready, ssfn_select(), SSFN_STYLE_REGULAR, VFS_OK, vma_register(), dentry::vnode, and vxMultipleMmap().
| void put_pixel | ( | int | x, |
| int | y, | ||
| uint32_t | color ) |
Definition at line 192 of file graphic.c.
References pixel_t::a, pixel_t::b, pixel_t::g, g__fb, pixel_t::r, x, and y.
Referenced by __attribute__().
| void put_pixel_alpha | ( | int | x, |
| int | y, | ||
| pixel_t | src ) |
Definition at line 207 of file graphic.c.
References pixel_t::a, pixel_t::b, blend(), pixel_t::g, g__fb, PTR_ADD, pixel_t::r, x, and y.
| void put_pixel_alpha_fast | ( | int | x, |
| int | y, | ||
| pixel_t | src ) |
Definition at line 259 of file graphic.c.
References pixel_t::a, pixel_t::b, pixel_t::g, g__fb, pixel_t::r, x, and y.
Definition at line 151 of file graphic.c.
References dst, FONT_SIZE, serial2_printf(), ssfn_ctx, ssfn_ready, ssfn_render(), and str().
Referenced by put_char_raw(), and tty_check_and_flush().
Definition at line 166 of file graphic.c.
References dst, FONT_SIZE, serial2_printf(), ssfn_ctx, ssfn_ready, and ssfn_render().
Referenced by tty_check_and_flush().
| uint32_t screen_cols | ( | void | ) |
Definition at line 327 of file graphic.c.
References FONT_SIZE, and vxGetWidth().
Referenced by advance_cursor(), and configure_tty().
| uint32_t screen_rows | ( | void | ) |
Definition at line 333 of file graphic.c.
References FONT_SIZE, h, and vxGetHeight().
Referenced by advance_cursor(), configure_tty(), do_scroll(), and put_char_raw().
|
static |
|
static |
Definition at line 30 of file graphic.c.
Referenced by ssfn_realloc(), and vxScroll().
|
static |
Definition at line 22 of file graphic.c.
Referenced by vxScroll().
|
static |
Definition at line 41 of file graphic.c.
References kalloc(), KALLOC_REDZONE_SIZE, kfree2(), NULL, ptr, kalloc_metadata_t::size, and ssfn_memcpy().
| int utf8_char_len | ( | uint8_t | c | ) |
Definition at line 180 of file graphic.c.
Referenced by tty_check_and_flush().
| uint32_t vxGetHeight | ( | void | ) |
Definition at line 316 of file graphic.c.
References dst.
Referenced by char_ioctl(), and screen_rows().
| uint32_t vxGetWidth | ( | void | ) |
Definition at line 315 of file graphic.c.
References dst.
Referenced by char_ioctl(), and screen_cols().
| void vxScroll | ( | int | px | ) |
Definition at line 318 of file graphic.c.
References dst, ssfn_memcpy(), and ssfn_memset().
Referenced by do_scroll(), and do_scroll().
|
static |
Definition at line 82 of file graphic.c.
Referenced by __fast__memcpy__(), __fast__memcpy_aligned__(), __fast_memset__(), __fast_memset_aligned__(), fill_rect(), fma_mul_add_pd(), fma_mul_sub_pd(), INIT(), ioforge_memcpy(), IOforgeStrCopy(), IOforgeStrnCopy(), IOForge::IOUtils::memcpy(), paging_setup(), putc(), putc_utf8(), simd_mul_pd(), simd_sub_pd(), sse_add_pd(), sse_div_pd(), sse_mul_pd(), sse_sub_pd(), ssfn_render(), IOForge::IOUtils::strcopy(), IOForge::IOUtils::strncopy(), vxGetHeight(), vxGetWidth(), and vxScroll().
| volatile framebuffer_t* g__fb |
Definition at line 81 of file graphic.c.
Referenced by __attribute__(), clear_screen(), fill_rect(), INIT(), put_pixel(), put_pixel_alpha(), and put_pixel_alpha_fast().
|
static |
Definition at line 83 of file graphic.c.
Referenced by INIT(), putc(), and putc_utf8().