|
Rapicorn - Experimental UI Toolkit - Source Code 10.08.1
|
00001 /* Rapicorn 00002 * Copyright (C) 2008 Tim Janik 00003 * 00004 * This library is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU Lesser General Public 00006 * License as published by the Free Software Foundation; either 00007 * version 2.1 of the License, or (at your option) any later version. 00008 * 00009 * This library is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 * Lesser General Public License for more details. 00013 * 00014 * A copy of the GNU Lesser General Public License should ship along 00015 * with this library; if not, see http://www.gnu.org/copyleft/. 00016 */ 00017 #ifndef __RAPICORN_BLIT_FUNCS_HH__ 00018 #define __RAPICORN_BLIT_FUNCS_HH__ 00019 00020 #include <ui/events.hh> 00021 00022 #ifndef __RAPICORN_BUILD__ 00023 #error This header file is for Rapicorn internal use only. 00024 #endif 00025 00026 namespace Rapicorn { 00027 namespace Blit { 00028 00029 00030 #if __BYTE_ORDER == __LITTLE_ENDIAN 00031 #define COLA(argb) ({ union { uint32 w; uint8 b[4]; } u; u.w = (argb); u.b[3]; }) 00032 #define COLR(argb) ({ union { uint32 w; uint8 b[4]; } u; u.w = (argb); u.b[2]; }) 00033 #define COLG(argb) ({ union { uint32 w; uint8 b[4]; } u; u.w = (argb); u.b[1]; }) 00034 #define COLB(argb) ({ union { uint32 w; uint8 b[4]; } u; u.w = (argb); u.b[0]; }) 00035 #else 00036 #define COLA(argb) ({ union { uint32 w; uint8 b[4]; } u; u.w = (argb); u.b[0]; }) 00037 #define COLR(argb) ({ union { uint32 w; uint8 b[4]; } u; u.w = (argb); u.b[1]; }) 00038 #define COLG(argb) ({ union { uint32 w; uint8 b[4]; } u; u.w = (argb); u.b[2]; }) 00039 #define COLB(argb) ({ union { uint32 w; uint8 b[4]; } u; u.w = (argb); u.b[3]; }) 00040 #endif 00041 #define COL_ARGB(a,r,g,b) (((a) << 24) | ((r) << 16) | ((g) << 8) | (b)) 00042 00043 struct RenderTable { 00044 void (*clear_fpu) (void); 00045 void (*combine_over) (uint32 *dst, 00046 const uint32 *src, 00047 uint span); 00048 void (*gradient_line) (uint32 *pixel, 00049 uint32 *bound, 00050 uint32 alpha1pre16, 00051 uint32 red1pre16, 00052 uint32 green1pre16, 00053 uint32 blue1pre16, 00054 uint32 alpha2pre16, 00055 uint32 red2pre16, 00056 uint32 green2pre16, 00057 uint32 blue2pre16); 00058 }; 00059 extern RenderTable render; 00060 00061 void render_optimize_mmx (void); 00062 00063 00064 } // Blit 00065 } // Rapicorn 00066 00067 #endif /* __RAPICORN_BLIT_FUNCS_HH__ */
1.7.4