diff options
author | Vladimir Vukicevic <vladimir@pobox.com> | 2005-12-07 21:18:32 +0000 |
---|---|---|
committer | Vladimir Vukicevic <vladimir@pobox.com> | 2005-12-07 21:18:32 +0000 |
commit | ae91b71d09c8f830eed8503ddb8a24d4c21c896b (patch) | |
tree | ff390df379cb329ea72f7d976f432a0bcdd8c5a5 /src | |
parent | a4ae6d912d869cb85f9fa097ae8ca549e369e384 (diff) |
2005-12-07 Vladimir Vukicevic <vladimir@pobox.com>
* src/agl/glitz_agl_format.c: AGL backend compilation fixes.
Diffstat (limited to 'src')
-rw-r--r-- | src/agl/glitz_agl_format.c | 44 |
1 files changed, 20 insertions, 24 deletions
diff --git a/src/agl/glitz_agl_format.c b/src/agl/glitz_agl_format.c index 5de385a..f388f2a 100644 --- a/src/agl/glitz_agl_format.c +++ b/src/agl/glitz_agl_format.c @@ -145,32 +145,28 @@ static int _glitz_agl_format_compare (const void *elem1, const void *elem2) { - int i, score[2]; - glitz_drawable_format_t *format[2]; + glitz_int_drawable_format_t *format[2]; + int i, score[2]; - format[0] = (glitz_drawable_format_t *) elem1; - format[1] = (glitz_drawable_format_t *) elem2; + format[0] = (glitz_int_drawable_format_t *) elem1; + format[1] = (glitz_int_drawable_format_t *) elem2; i = score[0] = score[1] = 0; - for (; i < 2; i++) { - if (format[i]->d.color.fourcc != GLITZ_FOURCC_RGB) - score[i] -= 1000; - - if (format[i]->d.color.red_size) { - if (format[i]->d.color.red_size == 8) + for (; i < 2; i++) + { + if (format[i]->d.color.red_size) + { + if (format[i]->d.color.red_size >= 8) score[i] += 5; - score[i] += 10; - } - if (format[i]->d.color.green_size) { - if (format[i]->d.color.green_size == 8) - score[i] += 5; score[i] += 10; } - if (format[i]->d.color.alpha_size) { - if (format[i]->d.color.alpha_size == 8) + if (format[i]->d.color.alpha_size) + { + if (format[i]->d.color.alpha_size >= 8) score[i] += 5; + score[i] += 10; } @@ -184,7 +180,7 @@ _glitz_agl_format_compare (const void *elem1, score[i] += 10; if (format[i]->d.samples > 1) - score[i] -= (20 - format[i]->samples); + score[i] -= (20 - format[i]->d.samples); if (format[i]->types & GLITZ_DRAWABLE_TYPE_WINDOW_MASK) score[i] += 10; @@ -200,9 +196,9 @@ _glitz_agl_format_compare (const void *elem1, } static void -_glitz_add_format (glitz_agl_thread_info_t *thread_info, - glitz_drawable_format_t *format, - AGLPixelFormat pixel_format) +_glitz_agl_add_format (glitz_agl_thread_info_t *thread_info, + glitz_int_drawable_format_t *format, + AGLPixelFormat pixel_format) { if (!glitz_drawable_format_find (thread_info->formats, thread_info->n_formats, @@ -233,9 +229,8 @@ glitz_agl_query_formats (glitz_agl_thread_info_t *thread_info) AGLPixelFormat pixel_format, *new_pfs; int n_attribs_list, i; - format.types = GLITZ_DRAWABLE_TYPE_WINDOW_MASK; - format.d.id = 0 - format.color.fourcc = GLITZ_FOURCC_RGB; + format.types = GLITZ_DRAWABLE_TYPE_WINDOW_MASK; + format.d.id = 0; n_attribs_list = sizeof (_attribs_list) / sizeof (GLint *); @@ -368,3 +363,4 @@ glitz_agl_find_pbuffer_format (unsigned long mask, mask, &itempl, count); } slim_hidden_def(glitz_agl_find_pbuffer_format); + |