Rapicorn - Experimental UI Toolkit - Source Code
13.07.0
|
00001 // Licensed GNU LGPL v3 or later: http://www.gnu.org/licenses/lgpl.html 00002 #ifndef __RAPICORN_BLIT_FUNCS_HH__ 00003 #define __RAPICORN_BLIT_FUNCS_HH__ 00004 00005 #include <ui/events.hh> 00006 00007 #ifndef __RAPICORN_BUILD__ 00008 #error This header file is for Rapicorn internal use only. 00009 #endif 00010 00011 namespace Rapicorn { 00012 namespace Blit { 00013 00014 00015 #if __BYTE_ORDER == __LITTLE_ENDIAN 00016 #define COLA(argb) ({ union { uint32 w; uint8 b[4]; } u; u.w = (argb); u.b[3]; }) 00017 #define COLR(argb) ({ union { uint32 w; uint8 b[4]; } u; u.w = (argb); u.b[2]; }) 00018 #define COLG(argb) ({ union { uint32 w; uint8 b[4]; } u; u.w = (argb); u.b[1]; }) 00019 #define COLB(argb) ({ union { uint32 w; uint8 b[4]; } u; u.w = (argb); u.b[0]; }) 00020 #else 00021 #define COLA(argb) ({ union { uint32 w; uint8 b[4]; } u; u.w = (argb); u.b[0]; }) 00022 #define COLR(argb) ({ union { uint32 w; uint8 b[4]; } u; u.w = (argb); u.b[1]; }) 00023 #define COLG(argb) ({ union { uint32 w; uint8 b[4]; } u; u.w = (argb); u.b[2]; }) 00024 #define COLB(argb) ({ union { uint32 w; uint8 b[4]; } u; u.w = (argb); u.b[3]; }) 00025 #endif 00026 #define COL_ARGB(a,r,g,b) (((a) << 24) | ((r) << 16) | ((g) << 8) | (b)) 00027 00028 struct RenderTable { 00029 void (*clear_fpu) (void); 00030 void (*combine_over) (uint32 *dst, 00031 const uint32 *src, 00032 uint span); 00033 void (*gradient_line) (uint32 *pixel, 00034 uint32 *bound, 00035 uint32 alpha1pre16, 00036 uint32 red1pre16, 00037 uint32 green1pre16, 00038 uint32 blue1pre16, 00039 uint32 alpha2pre16, 00040 uint32 red2pre16, 00041 uint32 green2pre16, 00042 uint32 blue2pre16); 00043 }; 00044 extern RenderTable render; 00045 00046 void render_optimize_mmx (void); 00047 00048 00049 } // Blit 00050 } // Rapicorn 00051 00052 #endif /* __RAPICORN_BLIT_FUNCS_HH__ */