示例#1
0
        void *omega_func(void *p)
        {
            bool doAlpha = false;

            pthread_mutex_lock(&alphaSpin);
            if(!initFlag) {
                initFlag = true;
                doAlpha = true;
            }
            pthread_mutex_unlock(&alphaSpin);

            if (doAlpha) {
                alpha_func(NULL);
            } else {
                puts("omega!");
            }
            pthread_exit(NULL);
        }
示例#2
0
/* Single-buffering draw_alpha */
static void draw_alpha(int x, int y, int w, int h, unsigned char *src,
                       unsigned char *srca, int stride)
{
    char *dst = (char *)inpage + (y * in_width + x) * in_depth;
    alpha_func(w, h, src, srca, stride, dst, in_width * in_depth);
}